Back to APIs list

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.
tylergaw avatar
socialImage
@tylergaw
HTTP (deprecated)
Simple image generator A bit of a toy image creator that can be used anywhere images can be, but is intended for social share images in og:image or twitter:image meta tags. Usage examples In a live web page Live example https://tylergaw-socialimageusage.web.val.run/ Live example Val https://www.val.town/v/tylergaw.socialImageUsage Code examples Default This will set the og:image of a web page to a png image of an orange 1200x600 pixel rectangle <meta property="og:image" content="https://tylergaw-socialimage.web.val.run/"> Works the same way as an embedded image <img src="https://tylergaw-socialimage.web.val.run/"> Customize with query parameters General note, some clients are more permissive with unencoded query params than others. It's best to encodeURIComponent for all params. Available params: bg : Sets the background color. Default orange . See Color format examples below for details color : Sets the background color. Default black . See Color format examples below for details w : Sets the width of the image. Default 1200 h : Sets the height of the image. Default 600 text : Sets the text displayed. Default Wellow horld <meta property="og:image" content="https://tylergaw-socialimage.web.val.run/?bg=pink&w=1000&h=400"> Color format examples bg and color parameters can any valid color that works with canvas fillStyle in hex, rgb(a), hsl(a), rrggbbaa, etc format. Note # must be encoded. Hex ?bg=%235f0ac7 rgb(a) ?bg=rgba(100,200,85,0.5) rrggbbaa ?bg=%23ff0095d1 hsl(a) ?bg=hsla(100,100%25,50%25,0.5)
mihir avatar
forceUnsub
@mihir
Script
An interactive, runnable TypeScript val by mihir
crsven avatar
refreshPoemWidget
@crsven
Script
An interactive, runnable TypeScript val by crsven
kisen avatar
queryAQI
@kisen
Script
An interactive, runnable TypeScript val by kisen
arash2060 avatar
VALLE
@arash2060
HTTP (deprecated)
Forked from janpaul123/VALLE
vladimyr avatar
podnews
@vladimyr
Script
// import { fetch } from "https://esm.town/v/std/fetch?v=4";
yawnxyz avatar
lucia_middleware_vanilla
@yawnxyz
HTTP (deprecated)
Forked from stevekrouse/lucia_middleware_vanilla
fil avatar
musee_angers_activites_feed
@fil
HTTP
Convert a webpage into an ATOM feed, so I can see when there are new activities in the local museum. feed link: https://fil-musee_angers_activites_feed.web.val.run/
ferruccio avatar
response
@ferruccio
Script
An interactive, runnable TypeScript val by ferruccio
iamseeley avatar
api
@iamseeley
Script
Forked from pomdtr/api
ayush37 avatar
forwarder
@ayush37
Email
Forked from stevekrouse/forwarder
tmcw avatar
valTownApiExampleSearch
@tmcw
Script
Val Town API Search This demonstrates how to use the Val Town API to search for vals that mention "lodash".
jrmann100 avatar
tryPush
@jrmann100
Script
An interactive, runnable TypeScript val by jrmann100
stevekrouse avatar
getSqliteDateMeDocs
@stevekrouse
Script
// let docs = await getDocs();
jdan avatar
writeMessage
@jdan
Express
An interactive, runnable TypeScript val by jdan
pomdtr avatar
valtownOpenAPI
@pomdtr
HTTP (deprecated)
Val Town Typescript Spec This val return an up-to-date typescript version of the val.town openapi spec for usage with a feTS client. Usage Deno script import { createClient, type NormalizeOAS } from "npm:fets"; import openapi from "https://pomdtr-valtownOpenAPI.web.val.run/openapi.ts"; export const client = createClient<NormalizeOAS<typeof openapi>>({ endpoint: openapi.servers[0].url, });