Skip to content

carlaiau/coinframes

Repository files navigation

Coinframes

Learning in public. My first adventure into Farcaster frame development. Using the https://frog.fm framework.

This is a simple frame that fetches the latest price and market information for a specific cryptocurrency ticker and displays a snapshot directly on the timeline

Intents allow you to change the ticker or refresh the present ticker as illustrated in this post: https://warpcast.com/carlaiau/0xae28a3c6 The site is hosted on Render which gives us a persistant run-time and therefore can use a simple caching layer to prevent bombarding CoinGecko's API

Instructions for local development

bun install
bun run dev

Head to http://localhost:5173/dev

.env variables

is_cg_pro= # true or false
cg_pro_api_key= # API key for CoinGecko Pro
cg_api_key= # API secret for CoinGecko Demo

To Do

The ability to subscribe to a pricing alert via casting a prompt (and also subscribe via the frame itself).

coinframe alert btc @30 - For alerting when asset reaches a specific price

coinframe alert sol 5 - For alerting when asset decreases/increases a specific amount from time of posting

coinframe alert eth 5% - For alerting when asset decreases a specific percentage from time of posting

Then once subscribed a frame is automatically cast to the subscriber when parameters are met. This functionality will be built using https://neynar.com/ SDK and webhooks system.