ডেভেলপার গাইড
finet-এর রেট আর ক্যালকুলেটর আপনার অ্যাপ, ওয়েবসাইট বা AI সহকারীতে যুক্ত করার নিয়ম। Connect your app or AI assistant to the finet API and MCP server.
তিন ধাপে শুরু / Quick start
- একটি API কী নিন। বিটা চলাকালে কী হাতে দেওয়া হয় (কী পাওয়ার নিয়ম)। Get an API key.
- প্রতিটি request-এ কী পাঠান:
Authorization: Bearer <key>(X-API-Keyহেডারও চলে)। Send it with every request. - JSON উত্তর পড়ুন:
data-তে ফলাফল,meta-তে উৎস ও সময়। Readdataandmeta.
curl -H "Authorization: Bearer <key>" "https://api.finet.tech/v1/calc/emi?principal=1000000&annual_rate_pct=9&years=10"
উত্তর / Response
{
"data": {
"principal": "1000000",
"annual_rate_pct": "9",
"years": 10,
"emi": "12667.58",
"total_payment": "1520109.29",
"total_interest": "520109.29"
},
"meta": {
"source": "formula",
"fetched_at": null,
"effective_date": null,
"stale": false
}
}
সংখ্যাগুলো string হিসেবে আসে, যাতে দশমিকের কোনো অঙ্ক না হারায়; Decimal বা BigNumber দিয়ে পড়ুন। Numbers are JSON strings so no digit is lost; parse them as decimals, not floats.
meta.source হলো উৎস (নিজস্ব সূত্রে হিসাব হলে formula)। রেটনির্ভর ফলাফলে রেট, রেটের তারিখ আর source_url থাকে।
meta.stale true হলে উৎস থেকে নতুন তথ্য আসেনি, সর্বশেষ জানা তথ্য দেওয়া হয়েছে।
আপনার অ্যাপ বা AI-তে finet / finet in your app or AI
এই সব রেট আপনার অ্যাপে (API) বা AI সহকারীতে (MCP) — সূত্রসহ, JSON-এ।
The same rates and calculators for your app (API) or AI assistant (MCP), with sources, as JSON.
API
REST, GET, JSON. API docs / এপিআই ডকুমেন্টেশন
curl -H "Authorization: Bearer <key>" "https://api.finet.tech/v1/calc/emi?principal=1000000&annual_rate_pct=9&years=10"
Rates / রেট: /v1/fx, /v1/gold, /v1/savings-certificates, /v1/fdr, /v1/dps, /v1/mudaraba
News / খবর: /v1/news (Good/Bad/Ugly, AI)
Calculators / ক্যালকুলেটর: /v1/calc/currency, /v1/calc/cross-currency, /v1/calc/remittance, /v1/calc/gold, /v1/calc/fdr, /v1/calc/savings-certificate, /v1/calc/dps, /v1/calc/savings-goal, /v1/calc/compound, /v1/calc/emi, /v1/calc/loan-prepayment, /v1/calc/land, /v1/calc/compare-deposits, /v1/calc/compare-dps, /v1/calc/compare-mudaraba
MCP
Claude, Cursor ও অন্য MCP ক্লায়েন্টে চলে / Works in Claude, Cursor and other MCP clients.
claude mcp add --transport http finet https://api.finet.tech/mcp --header "Authorization: Bearer <key>"
{"mcpServers": {"finet": {"type": "http", "url": "https://api.finet.tech/mcp",
"headers": {"Authorization": "Bearer <key>"}}}}
Tools / টুল: get_exchange_rate, get_gold_price, get_savings_certificate_rates, get_fdr_rates, get_dps_rates, get_mudaraba_rates, get_market_news, calc_currency, calc_cross_currency, calc_remittance, calc_gold, calc_fdr, calc_savings_certificate, calc_dps, calc_savings_goal, calc_compound, calc_emi, calc_loan_prepayment, calc_land, calc_compare_deposits, calc_compare_dps, calc_compare_mudaraba
Key পেতে / To get a key: API key / এপিআই কী · Free: 10000 calls/day · Pro: ask us
কোড উদাহরণ / Code examples
Send your key as Authorization: Bearer <key> (X-API-Key is also accepted).
Browser calls (GET) are allowed by CORS.
curl
curl -H "Authorization: Bearer <key>" https://api.finet.tech/v1/fx/USDPython
import json, urllib.request
req = urllib.request.Request("https://api.finet.tech/v1/fx/USD", headers={"Authorization": "Bearer <key>"})
print(json.load(urllib.request.urlopen(req)))JavaScript
const r = await fetch("https://api.finet.tech/v1/fx/USD", {headers: {Authorization: "Bearer <key>"}});
console.log(await r.json());MCP (Claude Code)
claude mcp add --transport http finet https://api.finet.tech/mcp --header "Authorization: Bearer <key>"MCP (generic JSON)
{"mcpServers": {"finet": {"type": "http", "url": "https://api.finet.tech/mcp",
"headers": {"Authorization": "Bearer <key>"}}}}ভুল ও সীমা / Errors and limits
ভুল হলে উত্তর আসে এভাবে / Errors look like: {"error": {"code": "…", "message": "…"}}
| HTTP | মানে / Meaning |
|---|---|
| 401 | কী নেই বা ভুল missing or invalid API key |
| 404 | এই মুদ্রা, ব্যাংক বা তথ্য পাওয়া যায়নি unknown currency, bank or no data yet |
| 422 | প্যারামিটার ভুল বা সীমার বাইরে a parameter is missing, malformed or out of range |
| 429 | আজকের সীমা শেষ; Retry-After হেডারে লেখা থাকে কত সেকেন্ড পরে আবার চেষ্টা করা যাবে daily quota used up; the Retry-After header gives the seconds to wait |
দৈনিক সীমা ঢাকা সময় রাত ১২টায় নতুন করে শুরু হয়। The daily quota resets at midnight, Dhaka time.
API key / এপিআই কী
API keys are issued manually during the beta.
বিটা চলাকালে এপিআই কী হাতে হাতে (ম্যানুয়ালি) দেওয়া হয়।
Request a key / কী চাইতে: mailto:alaminmain@yahoo.com
Pricing / মূল্য
Free: 10000 calls/day. Pro: ask us. Payment by bKash; your key is upgraded manually by the operator (finet-admin).
ফ্রি: দিনে 10000 কল। প্রো: জিজ্ঞাসা করুন। বিকাশে পেমেন্ট; অপারেটর ম্যানুয়ালি কী আপগ্রেড করেন।