ตัวแปลงสกุลเงินและ API อัตราแลกเปลี่ยน

อัตราแลกเปลี่ยนแบบเรียลไทม์สำหรับสกุลเงินกว่า 170 สกุล (เฟียต, คริปโต, โลหะมีค่า) เปรียบเทียบอัตราข้าม 8 แพลตฟอร์มรวมถึง Wise, Revolut, PayPal ข้อมูลย้อนหลังสูงสุด 1 ปี

รับ API Key ซื้อเครดิต
คุณสามารถทำอะไรได้บ้าง?
อัตราแลกเปลี่ยนแบบเรียลไทม์

สกุลเงินเฟียต คริปโต และโลหะมีค่ากว่า 170 สกุลในการเรียกครั้งเดียว

เปรียบเทียบอัตราข้ามแพลตฟอร์ม

เปรียบเทียบ Wise, Revolut, PayPal, XE และอีก 5 แพลตฟอร์มเพื่อหาข้อเสนอที่ดีที่สุด

ข้อมูลย้อนหลังสูงสุด 1 ปี

สแน็ปช็อตรายวันสำหรับการวิเคราะห์แนวโน้ม กราฟ และการทดสอบย้อนหลัง

99.9 % เวลาทำงาน
5ms การตอบกลับ
20 req/s
0.001 เครดิต / คำขอ

List Currencies


POST https://api.yeb.to/v1/currency/currencies
พารามิเตอร์ประเภทจำเป็นคำอธิบาย
api_key string ใช่ Your API key

ตัวอย่าง

curl -X POST https://api.yeb.to/v1/currency/currencies \
  -H "Content-Type: application/json" \
  -d '{
  "api_key": "YOUR_KEY"
}'

ตัวอย่างการตอบกลับ

{
  "currencies": [
    { "code": "EUR", "name": "Euro", "symbol": "\u20ac", "decimals": 2, "type": "fiat" },
    { "code": "USD", "name": "US Dollar", "symbol": "$", "decimals": 2, "type": "fiat" },
    { "code": "BTC", "name": "Bitcoin", "symbol": "\u20bf", "decimals": 8, "type": "crypto" },
    { "code": "XAU", "name": "Gold (Troy Ounce)", "symbol": "XAU", "decimals": 2, "type": "metal" }
  ],
  "total": 182,
  "top_fiat": ["USD","EUR","GBP","BGN","JPY","AUD","CAD","CHF"],
  "top_crypto": ["BTC","ETH","SOL","ADA","BNB","USDT","USDC","XRP","DOGE","DOT"],
  "metals": ["XAU","XAG","XPT","XPD"]
}
{"error":"Invalid API key","code":401}

รหัสตอบกลับ

รหัสคำอธิบาย
200 Successคำขอดำเนินการสำเร็จ
400 Bad Requestการตรวจสอบข้อมูลนำเข้าล้มเหลว
401 UnauthorizedAPI Key หายไปหรือไม่ถูกต้อง
403 ForbiddenKey ไม่ทำงานหรือไม่ได้รับอนุญาต
429 Rate Limitคำขอมากเกินไป
500 Server Errorข้อผิดพลาดที่ไม่คาดคิด

List Currencies

currency/currencies 0.0010 credits

Parameters

API Key
body · string · required

Code Samples


                
                
                
            

Response

Status:
Headers

                
Body

                

Get Exchange Rates


POST https://api.yeb.to/v1/currency/rates
พารามิเตอร์ประเภทจำเป็นคำอธิบาย
api_key string ใช่ Your API key
from string ไม่บังคับ Source currency code (use with to for single pair)
to string ไม่บังคับ Target currency code (use with from for single pair)
pairs array ไม่บังคับ Array of pairs: [{"from":"EUR","to":"BGN"}, ...] (max 20)

ตัวอย่าง

curl -X POST https://api.yeb.to/v1/currency/rates \
  -H "Content-Type: application/json" \
  -d '{
  "api_key": "YOUR_KEY",
  "from": "EUR",
  "to": "BGN"
}'

ตัวอย่างการตอบกลับ

{
  "rates": [
    {
      "from": "EUR",
      "to": "BGN",
      "rate": 1.955800,
      "source": "fawazahmed0",
      "fetched_at": "2026-02-20T14:30:00Z"
    }
  ]
}
{"error":"pairs array or from/to parameters are required","code":422}

รหัสตอบกลับ

รหัสคำอธิบาย
200 Successคำขอดำเนินการสำเร็จ
400 Bad Requestการตรวจสอบข้อมูลนำเข้าล้มเหลว
401 UnauthorizedAPI Key หายไปหรือไม่ถูกต้อง
403 ForbiddenKey ไม่ทำงานหรือไม่ได้รับอนุญาต
429 Rate Limitคำขอมากเกินไป
500 Server Errorข้อผิดพลาดที่ไม่คาดคิด

Get Exchange Rates

currency/rates 0.0050 credits

Parameters

API Key
body · string · required
From Currency
body · string
To Currency
body · string
Pairs
body · string

Code Samples


                
                
                
            

Response

Status:
Headers

                
Body

                

Convert Currency


POST https://api.yeb.to/v1/currency/convert
พารามิเตอร์ประเภทจำเป็นคำอธิบาย
api_key string ใช่ Your API key
from string ใช่ Source currency code (e.g. EUR, USD, BTC)
to string ใช่ Target currency code (e.g. BGN, GBP, ETH)
amount number ใช่ Amount to convert (0.01 – 10,000,000)
include_platforms bool ไม่บังคับ Include platform rate comparison (default: true)

ตัวอย่าง

curl -X POST https://api.yeb.to/v1/currency/convert \
  -H "Content-Type: application/json" \
  -d '{
  "api_key": "YOUR_KEY",
  "from": "EUR",
  "to": "BGN",
  "amount": 1000,
  "include_platforms": true
}'

ตัวอย่างการตอบกลับ

{
  "from": "EUR",
  "to": "BGN",
  "amount": 1000,
  "mid_market": {
    "rate": 1.9558,
    "result": 1955.80
  },
  "platforms": {
    "wise":    { "rate": 1.9460, "result": 1946.03, "fee": 5.93, "total_cost": 15.70, "markup": "0.50%" },
    "revolut": { "rate": 1.9509, "result": 1950.91, "fee": 0,    "total_cost": 4.89,  "markup": "0.25%" },
    "paypal":  { "rate": 1.8776, "result": 1877.57, "fee": 3.99, "total_cost": 82.22, "markup": "4.00%" }
  },
  "sources": { "primary": "fawazahmed0" },
  "fetched_at": "2026-02-20T14:30:00Z"
}
{"error":"Exchange rate not available for xxx/yyy","code":404}

รหัสตอบกลับ

รหัสคำอธิบาย
200 Successคำขอดำเนินการสำเร็จ
400 Bad Requestการตรวจสอบข้อมูลนำเข้าล้มเหลว
401 UnauthorizedAPI Key หายไปหรือไม่ถูกต้อง
403 ForbiddenKey ไม่ทำงานหรือไม่ได้รับอนุญาต
429 Rate Limitคำขอมากเกินไป
500 Server Errorข้อผิดพลาดที่ไม่คาดคิด

Convert Currency

currency/convert 0.0090 credits

Parameters

API Key
body · string · required
From Currency
body · string · required
To Currency
body · string · required
Amount
body · string · required
Include Platforms
body · string

Code Samples


                
                
                
            

Response

Status:
Headers

                
Body

                

List Platforms


POST https://api.yeb.to/v1/currency/platforms
พารามิเตอร์ประเภทจำเป็นคำอธิบาย
api_key string ใช่ Your API key

ตัวอย่าง

curl -X POST https://api.yeb.to/v1/currency/platforms \
  -H "Content-Type: application/json" \
  -d '{
  "api_key": "YOUR_KEY"
}'

ตัวอย่างการตอบกลับ

{
  "platforms": {
    "wise":       { "name": "Wise",          "markup": 0.50, "fee_pct": 0.50, "fee_flat": 0, "weekend_extra": 0 },
    "revolut":    { "name": "Revolut",       "markup": 0.25, "fee_pct": 0,    "fee_flat": 0, "weekend_extra": 0.75 },
    "paypal":     { "name": "PayPal",        "markup": 4.00, "fee_pct": 2.90, "fee_flat": 0, "weekend_extra": 0 },
    "skrill":     { "name": "Skrill",        "markup": 3.99, "fee_pct": 1.45, "fee_flat": 0, "weekend_extra": 0 },
    "western_union": { "name": "Western Union", "markup": 2.00, "fee_pct": 0, "fee_flat": 5, "weekend_extra": 0 },
    "xe":         { "name": "XE",            "markup": 0.50, "fee_pct": 0,    "fee_flat": 0, "weekend_extra": 0 },
    "remitly":    { "name": "Remitly",       "markup": 1.50, "fee_pct": 0,    "fee_flat": 0, "weekend_extra": 0 },
    "ofx":        { "name": "OFX",           "markup": 0.50, "fee_pct": 0,    "fee_flat": 0, "weekend_extra": 0 }
  }
}
{"error":"Invalid API key","code":401}

รหัสตอบกลับ

รหัสคำอธิบาย
200 Successคำขอดำเนินการสำเร็จ
400 Bad Requestการตรวจสอบข้อมูลนำเข้าล้มเหลว
401 UnauthorizedAPI Key หายไปหรือไม่ถูกต้อง
403 ForbiddenKey ไม่ทำงานหรือไม่ได้รับอนุญาต
429 Rate Limitคำขอมากเกินไป
500 Server Errorข้อผิดพลาดที่ไม่คาดคิด

List Platforms

currency/platforms 0.0010 credits

Parameters

API Key
body · string · required

Code Samples


                
                
                
            

Response

Status:
Headers

                
Body

                

Historical Rates


POST https://api.yeb.to/v1/currency/historical
พารามิเตอร์ประเภทจำเป็นคำอธิบาย
api_key string ใช่ Your API key
from string ใช่ Source currency code
to string ใช่ Target currency code
start_date string ไม่บังคับ Start date in YYYY-MM-DD (default: 30 days ago)
end_date string ไม่บังคับ End date in YYYY-MM-DD (default: today)

ตัวอย่าง

curl -X POST https://api.yeb.to/v1/currency/historical \
  -H "Content-Type: application/json" \
  -d '{
  "api_key": "YOUR_KEY",
  "from": "EUR",
  "to": "BGN",
  "start_date": "2026-01-01",
  "end_date": "2026-01-31"
}'

ตัวอย่างการตอบกลับ

{
  "from": "EUR",
  "to": "BGN",
  "start_date": "2026-01-01",
  "end_date": "2026-01-31",
  "rates": [
    { "date": "2026-01-01", "rate": 1.955800 },
    { "date": "2026-01-02", "rate": 1.955800 },
    { "date": "2026-01-03", "rate": 1.955600 }
  ],
  "count": 31
}
{"error":"Date range must not exceed 365 days","code":422}

รหัสตอบกลับ

รหัสคำอธิบาย
200 Successคำขอดำเนินการสำเร็จ
400 Bad Requestการตรวจสอบข้อมูลนำเข้าล้มเหลว
401 UnauthorizedAPI Key หายไปหรือไม่ถูกต้อง
403 ForbiddenKey ไม่ทำงานหรือไม่ได้รับอนุญาต
429 Rate Limitคำขอมากเกินไป
500 Server Errorข้อผิดพลาดที่ไม่คาดคิด

Historical Rates

currency/historical 0.0200 credits

Parameters

API Key
body · string · required
From Currency
body · string · required
To Currency
body · string · required
Start Date
body · string
End Date
body · string

Code Samples


                
                
                
            

Response

Status:
Headers

                
Body

                

ตัวแปลงสกุลเงินและ API อัตราแลกเปลี่ยน — Practical Guide

A hands-on guide to the Currency API: real-time exchange rates from multiple verified sources, platform fee comparison (Wise, Revolut, PayPal & more), historical rate data, and how to integrate it all into your application.

#What the Currency API does

The Currency API provides 5 endpoints for production-ready currency data: list 170+ currencies (fiat, crypto & metals), fetch live exchange rates from multiple verified sources, convert amounts with platform fee comparison, browse platform markups, and query historical daily rates for up to one year.

#Endpoints at a glance

Endpoint What it does Credits
currencies List all supported currencies with code, name, symbol, type (fiat/crypto/metal) 0.001
rates Get live exchange rates for one or more currency pairs (max 20) 0.005
convert Convert an amount & compare what you’d receive on 8 platforms 0.009
platforms List platforms with their markup percentages and fee structures 0.001
historical Daily historical rates for a pair (up to 365 days) 0.02

#Convert & Platform Comparison

The convert endpoint is the most popular. It returns the mid-market rate plus what you’d actually receive on each platform after their markup and fees.

POST
curl -X POST https://api.yeb.to/v1/currency/convert \
  -H "Content-Type: application/json" \
  -d '{
    "api_key": "YOUR_KEY",
    "from": "EUR",
    "to": "BGN",
    "amount": 1000,
    "include_platforms": true
  }'

The response includes the mid-market conversion and a breakdown per platform:

  • rate — the effective rate after platform markup
  • result — what you actually receive
  • fee — the platform’s transfer fee
  • total_cost — total hidden cost vs mid-market (markup + fee)
  • markup — the platform’s markup percentage

#Supported platforms

We compare rates across 8 popular money transfer platforms:

PlatformMarkupFeeNotes
Wise0.50%VariableTransparent mid-market based
Revolut0.25%None (free plan)+0.75% on weekends
XE0.50%NoneClose to mid-market
OFX0.50%NoneGood for large amounts
Remitly1.50%VariablePopular for remittances
Western Union2.00%Flat feeWide physical network
Skrill3.99%1.45%Digital wallet
PayPal4.00%2.90%Highest total cost

#Currency coverage

The API supports 170+ currencies across three categories:

  • Fiat — USD, EUR, GBP, BGN, JPY, CHF, AUD, CAD, and 150+ more
  • Crypto — BTC, ETH, SOL, ADA, BNB, USDT, USDC, XRP, DOGE, DOT
  • Precious metals — XAU (gold), XAG (silver), XPT (platinum), XPD (palladium)

Use the currencies endpoint to fetch the full list with symbols and decimal precision.

#Historical rates

The historical endpoint returns daily rate snapshots for any pair. Useful for building charts, calculating averages, or backtesting strategies.

  • Default range: last 30 days
  • Maximum range: 365 days
  • Dates in YYYY-MM-DD format

#How rates are sourced

Reliability is built in through multi-source aggregation:

  1. Primary — fawazahmed0 exchange API (CDN-backed, 200+ currencies, no rate limit, updated every 15 min)
  2. Secondary — fxratesapi.com (real-time verification every 30 min)
  3. Fallback — European Central Bank (ECB) daily reference rates
  4. Cache — last known rate if all sources are temporarily unavailable (< 24h)

If the primary and secondary sources diverge by more than 1%, the system logs a deviation warning and uses the primary rate.

#Common use cases

  • E-commerce — display prices in the visitor’s local currency
  • Fintech apps — show users how much they’d save on each platform
  • Travel apps — quick multi-currency converter
  • Accounting — historical rates for end-of-month reconciliation
  • Crypto dashboards — live BTC/ETH prices alongside fiat

คำถามที่พบบ่อย

เรารวบรวมอัตราจากหลายแหล่งอิสระ (fawazahmed0, fxratesapi, ECB) และตรวจสอบข้ามกัน หากแหล่งหนึ่งล่ม แหล่งอื่นจะทำหน้าที่สำรอง

มาร์กอัปของแพลตฟอร์มอ้างอิงจากโครงสร้างค่าธรรมเนียมที่เผยแพร่ เราใช้เปอร์เซ็นต์มาร์กอัปที่ทราบของแต่ละแพลตฟอร์มกับอัตราตลาดกลาง อัตราจริงอาจแตกต่างเล็กน้อยขึ้นอยู่กับจำนวนเงินและเส้นทางการโอน

ใช่ เรารองรับสกุลเงินคริปโตหลักกว่า 10 สกุล รวมถึง BTC, ETH, SOL, USDT, USDC และอื่นๆ โลหะมีค่า (XAU, XAG, XPT, XPD) ก็มีให้บริการเช่นกัน

อัตราย้อนหลังมีให้สูงสุด 365 วัน สแน็ปช็อตรายวันจะถูกบันทึกโดยอัตโนมัติและจัดเก็บเพื่อใช้ในการสร้างกราฟและวิเคราะห์

อัตราหลักจะรีเฟรชทุก 15 นาที การตรวจสอบแหล่งสำรองทำงานทุก 30 นาที การค้นหาคู่สกุลเงินแต่ละคู่จะถูกแคชเป็นเวลา 5 นาที

ใช่ ทุกคำขอ แม้แต่ที่เกิดข้อผิดพลาด จะใช้เครดิต เครดิตของคุณผูกกับจำนวนคำขอ ไม่ว่าจะสำเร็จหรือล้มเหลว หากข้อผิดพลาดเกิดจากปัญหาของแพลตฟอร์มฝั่งเราอย่างชัดเจน เราจะคืนเครดิตที่ได้รับผลกระทบ (ไม่มีการคืนเงินสด)

ติดต่อเราที่ [email protected] เรารับฟังความคิดเห็นอย่างจริงจัง—หากรายงานข้อบกพร่องหรือคำขอฟีเจอร์ของคุณมีความหมาย เราสามารถแก้ไขหรือปรับปรุง API ได้อย่างรวดเร็วและมอบเครดิตฟรี 50 เครดิตเป็นการขอบคุณ

ขึ้นอยู่กับ API และบางครั้งรวมถึง endpoint ด้วย บาง endpoint ใช้ข้อมูลจากแหล่งภายนอกซึ่งอาจมีขีดจำกัดที่เข้มงวดกว่า เรายังบังคับใช้ขีดจำกัดเพื่อป้องกันการใช้ในทางที่ผิดและรักษาเสถียรภาพของแพลตฟอร์ม ตรวจสอบเอกสารสำหรับขีดจำกัดเฉพาะของแต่ละ endpoint

เราใช้ระบบเครดิต เครดิตเป็นหน่วยจ่ายล่วงหน้าที่ไม่สามารถคืนเงินได้ ใช้สำหรับการเรียก API และเครื่องมือ เครดิตถูกใช้แบบ FIFO (เก่าสุดก่อน) และมีอายุ 12 เดือนนับจากวันที่ซื้อ แดชบอร์ดแสดงวันที่ซื้อแต่ละครั้งและวันหมดอายุ

ใช่ เครดิตที่ซื้อทั้งหมด (รวมถึงยอดคงเหลือเศษส่วน) มีอายุ 12 เดือนนับจากการซื้อ เครดิตที่ไม่ได้ใช้จะหมดอายุโดยอัตโนมัติและถูกลบอย่างถาวรเมื่อสิ้นสุดระยะเวลาที่มีผล เครดิตที่หมดอายุไม่สามารถกู้คืนหรือแปลงเป็นเงินสดหรือมูลค่าอื่นได้ กฎเปลี่ยนผ่าน: เครดิตที่ซื้อก่อน 22 ก.ย. 2025 ถือว่าซื้อเมื่อ 22 ก.ย. 2025 และหมดอายุ 22 ก.ย. 2026 (เว้นแต่ระบุวันหมดอายุที่เร็วกว่าตอนซื้อ)

ใช่—ภายในระยะเวลาที่มีผล เครดิตที่ไม่ได้ใช้ยังคงใช้ได้และยกยอดจากเดือนต่อเดือนจนกว่าจะหมดอายุ 12 เดือนหลังการซื้อ

เครดิตไม่สามารถคืนเงินได้ ซื้อเฉพาะที่คุณต้องการ—คุณสามารถเติมได้ภายหลังเสมอ หากข้อผิดพลาดของแพลตฟอร์มทำให้การเรียกเก็บเงินล้มเหลว เราอาจคืนเครดิตที่ได้รับผลกระทบหลังจากการตรวจสอบ ไม่มีการคืนเงินสด

ราคากำหนดเป็นเครดิต ไม่ใช่ดอลลาร์ แต่ละ endpoint มีราคาของตัวเอง—ดูป้าย "เครดิต / คำขอ" ด้านบน คุณจะรู้ค่าใช้จ่ายที่แน่นอนเสมอ
← กลับไปที่ API