🔍 Průzkum Bitfinex Historical Rates API

📡 Test Bitfinex veřejných API pro historické rates

💰 Testování pro USD

🧪 Test: Funding History - fUSD

URL: https://api-pub.bitfinex.com/v2/funding/fUSD/hist?limit=50

❌ Chyba (HTTP 404)

<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8">
<title>Error</title>
</head>
<body>
<pre>Cannot GET /api/v2/funding/fUSD/hist</pre>
</body>
</html>

🧪 Test: Stats Funding Average - fUSD

URL: https://api-pub.bitfinex.com/v2/stats1/funding.avg:1h:fUSD/hist?limit=24

✅ Úspěch (HTTP 200)

⚠️ Nevalidní JSON nebo prázdný response

[]

🧪 Test: Funding Candles - fUSD

URL: https://api-pub.bitfinex.com/v2/candles/funding:fUSD:hist?limit=24

❌ Chyba (HTTP 404)

<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8">
<title>Error</title>
</head>
<body>
<pre>Cannot GET /api/v2/candles/funding:fUSD:hist</pre>
</body>
</html>

🧪 Test: Alternative Stats - fUSD

URL: https://api-pub.bitfinex.com/v2/stats1/funding.size:1h:fUSD/hist?limit=24

✅ Úspěch (HTTP 200)

Počet záznamů: 24

📊 Ukázka prvních 3 záznamů:

IndexHodnotyInterpretace
0[1790593200000,6061093537.594525]Čas: 2026-09-28 11:00:00, Rate: 6061093537.5945
1[1790589600000,6103868794.222198]Čas: 2026-09-28 10:00:00, Rate: 6103868794.2222
2[1790586000000,6101491984.83295]Čas: 2026-09-28 09:00:00, Rate: 6101491984.8329

💰 Testování pro BTC

🧪 Test: Funding History - fBTC

URL: https://api-pub.bitfinex.com/v2/funding/fBTC/hist?limit=50

❌ Chyba (HTTP 404)

<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8">
<title>Error</title>
</head>
<body>
<pre>Cannot GET /api/v2/funding/fBTC/hist</pre>
</body>
</html>

🧪 Test: Stats Funding Average - fBTC

URL: https://api-pub.bitfinex.com/v2/stats1/funding.avg:1h:fBTC/hist?limit=24

✅ Úspěch (HTTP 200)

⚠️ Nevalidní JSON nebo prázdný response

[]

🧪 Test: Funding Candles - fBTC

URL: https://api-pub.bitfinex.com/v2/candles/funding:fBTC:hist?limit=24

❌ Chyba (HTTP 404)

<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8">
<title>Error</title>
</head>
<body>
<pre>Cannot GET /api/v2/candles/funding:fBTC:hist</pre>
</body>
</html>

🧪 Test: Alternative Stats - fBTC

URL: https://api-pub.bitfinex.com/v2/stats1/funding.size:1h:fBTC/hist?limit=24

✅ Úspěch (HTTP 200)

Počet záznamů: 24

📊 Ukázka prvních 3 záznamů:

IndexHodnotyInterpretace
0[1790593200000,846.02477299]Čas: 2026-09-28 11:00:00, Rate: 846.02477299
1[1790589600000,847.18501044]Čas: 2026-09-28 10:00:00, Rate: 847.18501044
2[1790586000000,846.71264539]Čas: 2026-09-28 09:00:00, Rate: 846.71264539

💰 Testování pro EUR

🧪 Test: Funding History - fEUR

URL: https://api-pub.bitfinex.com/v2/funding/fEUR/hist?limit=50

❌ Chyba (HTTP 404)

<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8">
<title>Error</title>
</head>
<body>
<pre>Cannot GET /api/v2/funding/fEUR/hist</pre>
</body>
</html>

🧪 Test: Stats Funding Average - fEUR

URL: https://api-pub.bitfinex.com/v2/stats1/funding.avg:1h:fEUR/hist?limit=24

✅ Úspěch (HTTP 200)

⚠️ Nevalidní JSON nebo prázdný response

[]

🧪 Test: Funding Candles - fEUR

URL: https://api-pub.bitfinex.com/v2/candles/funding:fEUR:hist?limit=24

❌ Chyba (HTTP 404)

<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8">
<title>Error</title>
</head>
<body>
<pre>Cannot GET /api/v2/candles/funding:fEUR:hist</pre>
</body>
</html>

🧪 Test: Alternative Stats - fEUR

URL: https://api-pub.bitfinex.com/v2/stats1/funding.size:1h:fEUR/hist?limit=24

✅ Úspěch (HTTP 200)

Počet záznamů: 24

📊 Ukázka prvních 3 záznamů:

IndexHodnotyInterpretace
0[1790593200000,6489283.62183491]Čas: 2026-09-28 11:00:00, Rate: 6489283.6218349
1[1790589600000,6495703.52478547]Čas: 2026-09-28 10:00:00, Rate: 6495703.5247855
2[1790586000000,6495005.38444587]Čas: 2026-09-28 09:00:00, Rate: 6495005.3844459

🎯 Závěry a doporučení

Na základě testů výše identifikuji nejlepší API endpoint pro historické funding rates.

📋 Možné endpointy:

🔧 Implementace do botu

Pokud některý endpoint funguje, můžeme:

  1. Nahradit lokální historii rates_24h.json
  2. Získávat aktuální historické rates přímo z Bitfinex
  3. Mít skutečné max rates za 1h, 24h, 72h, 168h

⚡ Výhody API přístupu