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.
janpaul123 avatar
valle_tmp_33233416150321853525734847298241
@janpaul123
HTTP (deprecated)
// This val responds with an HTML form styled with CSS, allowing the user to input their name and receive a greeting upon submission
postpostscript avatar
jwksUtils
@postpostscript
Script
An interactive, runnable TypeScript val by postpostscript
yieldray avatar
minifyHTML
@yieldray
Script
Usage: import { minifyHTML } from "https://esm.town/v/yieldray/minifyHTML"; const minified = await minifyHTML("<html>...</html>", { ...options }); As an API: import { runVal } from "https://esm.town/v/std/runVal"; const minified = awaitrunVal("yieldray.minifyHTML", "<html>...</html>", { ...options });
neverstew avatar
inTheBackgroundExample
@neverstew
HTTP (deprecated)
inTheBackground With the addition of the "early return" feature of web handlers, you can now process short background tasks in vals. This can be really useful for occasions where an immediate response is required, with a subsequent update a few seconds later e.g. a Discord bot that calls ChatGPT needs to respond within a few seconds, which can be too fast for the AI to generate a response. We can instead reply immediately and then update that message later, inTheBackground Simply wrap something in inTheBackground and it will do just that! In this example, we log something a few seconds later than the web response is sent back.
yawnxyz avatar
translate
@yawnxyz
HTTP (deprecated)
Forked from yieldray/translate
vladimyr avatar
dataURL_example
@vladimyr
Script
An interactive, runnable TypeScript val by vladimyr
maxm avatar
selfEditingWebsite
@maxm
HTTP (deprecated)
Self Editing Website Visit and edit at: https://maxm-selfeditingwebsite.web.val.run/
stevekrouse avatar
replyToEx
@stevekrouse
Script
An interactive, runnable TypeScript val by stevekrouse
jermspeaks avatar
isMyWebsiteDown
@jermspeaks
Cron
Forked from andreterron/isMyWebsiteDown
stevekrouse avatar
docFeedbackForm
@stevekrouse
HTTP (deprecated)
Forked from stevekrouse/form
wilt avatar
getOpenMeteoForecast
@wilt
Script
// See https://open-meteo.com/en/docs for usage
mattx avatar
arbitraryFileRead
@mattx
Script
An interactive, runnable TypeScript val by mattx
tmalaher avatar
greetWebhook
@tmalaher
Script
An interactive, runnable TypeScript val by tmalaher
saolsen avatar
use_example_rust_http_val
@saolsen
HTTP (deprecated)
An interactive, runnable TypeScript val by saolsen
tmcw avatar
sha256Example
@tmcw
Script
Creating a SHA-256 hash of a string This example shows how you can hash a string using SHA-256 without using any NPM modules – just web standards! Adapted from an example on MDN .
zarutian avatar
getMyValTownUserUUID
@zarutian
Script
// const VALTOWN_API_URL = "https://api.val.town/v1";