US Congress Stock Trading API examples & templates
Use these vals as a playground to view and fork US Congress Stock Trading API examples and templates on Val Town. Run any example below or find templates that can be used as a pre-built solution.
jamiedubs
nftImage
HTTP
returns image URL (and only image URL) for a given NFT contract + tokenId. Uses Alchemy's NFT API to this use val, copy the Web API endpoint and use ?query params to specify the contract address and tokenId you want: https://jamiedubs-nftimage.web.val.run/?contractAddress=0x3769c5700Da07Fe5b8eee86be97e061F961Ae340&tokenId=666 - FIXME valtown is turning & into "&", you need to fix it. even like this broken plain text by default. for JSON add &format=json , for an <img> tag use &format=html for other NFT metadata: https://www.val.town/v/jamiedubs.nftMetadata
1
tmcw
litExample
Script
lit Lit is kind of like Google's answer to React: it's a little more reliant on browser APIs like custom elements and the shadow DOM, a little less 'magic', like using JSX. This is an example of using Lit and rendering it straight to a string, which is something that's recently popular. It works pretty well, right off the bat: Lit provides nice ESM modules and a pretty smooth workflow!
0
![pomdtr avatar](https://images.clerk.dev/oauth_github/img_2RCoAITJZH1QencEgtVjh4Qirj4.jpeg)
pomdtr
devtools
Script
Devtools shortcuts Add useful shortcuts to a val website. Usage /_edit -> go to the val editor /_raw -> view val source /_logs -> view val logs Example import { devtools } from "https://esm.town/v/pomdtr/devtools";
export default devtools((_req: Request) => {
return new Response("hello world");
});
4