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.
stevekrouse avatar
getDateMeDatabase
@stevekrouse
Script
An interactive, runnable TypeScript val by stevekrouse
syncretizm avatar
singleformulaEndpoint
@syncretizm
HTTP (deprecated)
An interactive, runnable TypeScript val by syncretizm
pomdtr avatar
auth_middleware
@pomdtr
Script
Authentication middleware Guards your public http vals behind a login page. This val use a json web token stored as an http-only cookie to persist authentication. Usage Set an AUTH_SECRET_KEY env variable (used to sign/verify jwt tokens) to a random string . Then use an API token to authenticate. import { auth } from "https://esm.town/v/pomdtr/auth_middleware"; async function handler(req: Request): Promise<Response> { return new Response("You are authenticated!"); } export default auth(handler); See @pomdtr/test_auth for an example ⚠️ Make sure to only provides your api token to vals you trust (i.e. your own), as it gives access to your whole account.
pomdtr avatar
testBasicAuth
@pomdtr
HTTP (deprecated)
An interactive, runnable TypeScript val by pomdtr
stevekrouse avatar
handleFormExample
@stevekrouse
Script
An interactive, runnable TypeScript val by stevekrouse
karfau avatar
getRedirectToValResponse
@karfau
Script
Forked from neverstew/thisValUrl
stevekrouse avatar
memoryApiExample
@stevekrouse
HTTP (deprecated)
Forked from xkonti/memoryApiExample
ralfw avatar
blobAdmin
@ralfw
HTTP (deprecated)
Forked from stevekrouse/blob_admin
ayrtonlacerda avatar
getDetailsPlaystore
@ayrtonlacerda
HTTP (deprecated)
Function that fetches app data from the playstore through bundleId
stevekrouse avatar
alive
@stevekrouse
Script
Human Alive-ness API It works by querying Wikidata via SPARQL to search for birth and death dates of a person. Requires an exact name match. It will throw if it can't find results. It will return true if every match has a birth date and not a death date. (It will return false if a match does not have a birth date, because we assume that to mean they are a historical figure whose birthdate we don't know.) @stevekrouse.alive("Henry Kissinger") // true (for now) You can view some example usages / tests here: https://www.val.town/v/stevekrouse.aliveTests
stevekrouse avatar
isValidURL
@stevekrouse
Script
Check if a URL is valid Returns true if a URL is valid and false if not
stevekrouse avatar
auth_middleware
@stevekrouse
Script
Forked from pomdtr/auth_middleware
stevekrouse avatar
nodeJS_dist
@stevekrouse
Script
// set at Tue Jan 16 2024 18:37:20 GMT+0000 (Coordinated Universal Time)
dthyresson avatar
airportCodeMapRedirector
@dthyresson
HTTP (deprecated)
IATA Airport Code Map Redirector I needed way redirect to a map for a given aiport given an IATA airport code . This way is it's a simple proxy redirect and I can change if I want to use Google Maps or another service (or change zoom levels, etc) without having to update the link. Usage: Boston Logan: https://iata.thyresson.io?q=bos
octref avatar
handleForm
@octref
Script
An interactive, runnable TypeScript val by octref
pomdtr avatar
illIndigoVicuna
@pomdtr
HTTP (deprecated)
An interactive, runnable TypeScript val by pomdtr