Skip to content

KokoFinance/examples

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

6 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Koko Finance API — Examples

Credit card intelligence in 5 minutes. Compare cards, get recommendations, analyze portfolios, and check renewal value — all via a simple API.

Get Started

1. Get a free API key

Sign up at kokofinance.net/dashboard.html — takes 30 seconds.

2. Install the Python SDK

pip install koko-finance

3. Make your first call

import os
from koko_finance import KokoClient

client = KokoClient(api_key=os.environ["KOKO_API_KEY"])

# Compare two cards (fast, <100ms)
result = client.compare_cards(
    cards=["Chase Sapphire Preferred", "Amex Gold Card"]
)
for card in result["comparison_table"]:
    print(f"{card['card_name']}: net value ${card['net_value']}/year")

# Best card for dining
result = client.recommend_card(category="dining")
print(result["recommendations"][0]["card_name"])

# Is this card worth renewing?
result = client.check_renewal(card={"card_name": "Chase Sapphire Reserve"})
print(result["verdict"])  # RENEW, DOWNGRADE, or CANCEL_AND_REPLACE

No spending data required. No portfolio setup. Just card names.

Examples

Python SDK

Example What It Does Complexity
01_compare_cards.py Compare two cards side-by-side Beginner
02_best_card_for_category.py Find the best card for dining, travel, etc. Beginner
03_analyze_portfolio.py Portfolio value breakdown Beginner
04_renewal_check.py Should you keep this card? Beginner
05_issuer_preferences.py Boost specific card issuers in results Intermediate
06_benefit_categories.py Discover benefit keys + use in analysis Intermediate
07_merchant_which_card.py Best card at a merchant (auto-detects category) Beginner
08_merchant_benefits.py Check card credits at a merchant Beginner
09_card_benefits.py All credits/benefits for a card Beginner

curl (no SDK needed)

Example What It Does
compare.sh Compare cards via raw HTTP
recommend.sh Get card recommendations
renewal.sh Check card renewal value
merchant-which-card.sh Best card at a merchant
merchant-benefits.sh Check card credits at a merchant
card-benefits.sh Get all benefits for a card

MCP Server (for Claude Desktop / AI agents)

Guide What It Covers
Claude Desktop Setup Connect Koko MCP to Claude in 2 minutes
Sample Prompts Example conversations with the MCP server

Agentic

Example What It Does
card_advisor_agent.py Build an AI credit card advisor with OpenAI + Koko
Agent README How the agentic pattern works

Two Ways to Access

Method Best For Docs
REST API Apps, backends, scripts API Docs / Swagger UI
MCP Server Claude Desktop, AI agents MCP Setup

Both use the same underlying intelligence. Same data, same calculations, same structured output.

Free Tier

  • 2,000 calls/month (REST + MCP combined)
  • All endpoints included
  • No credit card required
  • Get your API key

Links

About

Credit card intelligence in 5 minutes — examples for the Koko Finance API & MCP server

ttps://kokofinance.net

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors