You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
importosfromkoko_financeimportKokoClientclient=KokoClient(api_key=os.environ["KOKO_API_KEY"])
# Compare two cards (fast, <100ms)result=client.compare_cards(
cards=["Chase Sapphire Preferred", "Amex Gold Card"]
)
forcardinresult["comparison_table"]:
print(f"{card['card_name']}: net value ${card['net_value']}/year")
# Best card for diningresult=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.