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.
jxnblk avatar
jxnblk
caviar
Script
Simple CSS Vars library import { caviar } from "https://esm.town/v/jxnblk/caviar"; const vars = caviar({ dark: { text: "#000", bg: "#fff", }, light: { text: "#fff", bg: "#000", }, }); // JSX example <div style={vars.style.light}> <h1 style={{ color: vars.text, backgroundColor: vars.bg, }}> Hello </h1> </div> Can also be used for non-dynamic CSS vars import { caviar } from "https://esm.town/v/jxnblk/caviar"; const vars = caviar({ blue: "#0cf", }); // <div style={vars.style} /> Tests: https://www.val.town/v/jxnblk/caviar_tests TODO [ ] Fallback for missing mode keys
2
janpaul123 avatar
janpaul123
valle_tmp_64999577077992354084608091464872
HTTP
An interactive, runnable TypeScript val by janpaul123
0
stevekrouse avatar
stevekrouse
lucia_middleware
Script
Forked from stevekrouse/lucia_demo
2
dhvanil avatar
dhvanil
web_5If23gmesX
HTTP
An interactive, runnable TypeScript val by dhvanil
0
ianv avatar
ianv
getRSS
Script
An interactive, runnable TypeScript val by ianv
0
stevekrouse avatar
stevekrouse
euler
Script
An interactive, runnable TypeScript val by stevekrouse
0
rlesser avatar
rlesser
sqliteTableExportUtils
Script
SQLite Table Export Utils This allows for a val.town-hosted SQLite table to be exported as: JSON ( Record<string, unknown>[] ) Arrow IPC ( Uint8Array ) TODO: Others? This can then be used by a HTTP endpoint, like so: import { exportSQLiteTable, SQLiteTableExportFormat } from "https://esm.town/v/rlesser/sqliteTableExportUtils"; export default async function(req: Request): Promise<Response> { const tableName = new URL(req.url).searchParams.get("table"); if (!tableName) { return new Response("Table name is required", { status: 400 }); } const format = (new URL(req.url).searchParams.get("format") || "arrowIPC") as SQLiteTableExportFormat; const data = await exportSQLiteTable(tableName, format); if (data instanceof Uint8Array) { return new Response(data, { headers: { "Content-Type": "application/octet-stream" }, }); } else { return Response.json(data); } } TODO Specify limit and offset of export, for pagination Smart assessment of if the export is going to be over the val.town limit of 10MB, adjust to paginated of so. Support other export formats. PRs welcome!
2
onemanwenttomow avatar
onemanwenttomow
getGithubUsersByTeam
Script
An interactive, runnable TypeScript val by onemanwenttomow
0
sumukh avatar
sumukh
twitterAlert
Cron
Forked from stevekrouse/twitterAlert
0
adagradschool avatar
adagradschool
satisfiedPurpleHyena
HTTP
An interactive, runnable TypeScript val by adagradschool
0
stevekrouse avatar
stevekrouse
plotHTMLExample
HTTP
Observable Plot Vanilla HTML Example Code from https://observablehq.com/plot/getting-started#plot-in-vanilla-html
0
iamseeley avatar
iamseeley
resumeSetup
Script
An interactive, runnable TypeScript val by iamseeley
0
izabayomucyo35p avatar
izabayomucyo35p
listGuestsMainPage
HTTP
@jsxImportSource https://esm.sh/react@18.2.0
1
stevekrouse avatar
stevekrouse
logError
Script
An interactive, runnable TypeScript val by stevekrouse
0
jumptoai avatar
jumptoai
aiImageGenerator
Script
@jsxImportSource https://esm.sh/react
0
pomdtr avatar
pomdtr
valToString
Script
An interactive, runnable TypeScript val by pomdtr
0