This is a Farcaster Frame for dynamic and interactive price feed. The frame will provide latest price updates for Ethereum (ETH) and Bitcoin (BTC) in an engaging and visually appealing manner.
The project consists of the following key components:
- API Routes: The
src/app/api/price/route.ts
file defines API routes for fetching and processing price data for ETH and BTC. - Image Generation: The
src/utils/image.ts
file includes functions for generating images representing price data. - Price Data: The
src/utils/price.ts
file contains functions for fetching price data for ETH and BTC.
The project uses the following dependencies:
axios
: For making API requests to the subgraph endpoint.satori
: For converting HTML and CSS to svgsharp
: For converting SVG images to PNG.
To run the project locally, follow these steps:
- Clone the repository:
git clone https://github.com/AjayiMike/price-feed-farcaster-frame
-
rename
env.example
to.env
and set your SUBGRAPH_API_KEY -
Install dependencies:
cd farcaster-frame
npm install
or
yarn install
or
pnpm install
- Start the development server:
npm run dev
or
yarn dev
or
pnpm dev
-
Test the frame at using framegear or any local frame tester
-
Once satisfied, deploy and test using warpcast frame tester