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.
mepuka avatar
rideWithGPSredirect
@mepuka
Script
An interactive, runnable TypeScript val by mepuka
yurivish avatar
iopEmail
@yurivish
HTTP (deprecated)
Forked from neverstew/saveFormData
vbnm avatar
tell
@vbnm
Script
An interactive, runnable TypeScript val by vbnm
easrng avatar
uploadTo0x0
@easrng
Script
upload to 0x0.st usage: import { uploadTo0x0 } from "https://esm.town/v/easrng/uploadTo0x0" console.log(await uploadTo0x0("test data", "filename")) data can be a string, a TypedArray, an ArrayBuffer, or a Blob returns a url (ie https://0x0.st/X-wB.txt ) to a file that expires after an hour
agmm avatar
teapot
@agmm
HTTP (deprecated)
An interactive, runnable TypeScript val by agmm
jdan avatar
hashmail
@jdan
Script
Forked from stevekrouse/testEmail2
nbbaier avatar
submitPR
@nbbaier
Script
Submit a PR from Val Town This val provides a (very) thin wrapper around the GH rest API methods for creating a pull request. It handles the creation of a Octokit client for you. Usage import { submitPR } from "https://esm.town/v/nbbaier/submitPR"; await submitPR(Deno.env.get("GH_REPO_TOKEN"), { owner: "nbbaier", repo: "test-ground", head: "branch_2", base: "main", title: "trying another PR", body: "cool stuff, take a look", }); Parameters The function takes two parameters: your gh access token and an object that's identical to the object submitted to the gh API. See GH's documentation for more info!
freecrayon avatar
zodStringToJSON_example
@freecrayon
Script
// usually this will be passed to you by your Server (i.e. SvelteKit, Remix)
visnup avatar
beacon
@visnup
HTTP (deprecated)
Cross-origin cookie test Reacquaint myself with how modern browsers deal with cross-origin cookies. Specifically, how aggressive does Safari limit them nowadays? (Answer: very aggressive, to the point of just disabling them.) This endpoint simply tries to assign a 28-day-from-now-expiring device cookie when requested, providing all of the obligatory-in-2024 cookie flags and headers to allow cross-origin support. You can request it from another origin in different browsers and inspect if cookies are sent back or not (either via sendBeacon or fetch(..., {credentials: "include"}) or in the iframe browser preview below). Chrome and Firefox subsequently send back a persistent cookie; Safari does not. Edge probably does what Chrome does. I dunno what Braze does.
andreterron avatar
formResponses
@andreterron
Script
// set by andreterron.form_handler at 2023-09-14T15:04:57.786Z
arpad avatar
umbrellaReminder
@arpad
Cron
Forked from stevekrouse/umbrellaReminder
ampp avatar
WikiImage
@ampp
HTTP (deprecated)
Forked from jamiedubs/nftImage
hyperNURb2 avatar
tell
@hyperNURb2
Script
An interactive, runnable TypeScript val by hyperNURb2
stevekrouse avatar
myTestForm
@stevekrouse
Script
// set by stevekrouse.handleFormExample at 2023-04-12T16:18:06.208Z
damidina avatar
cheerioScraper
@damidina
Script
cheerioScraper This val scrapes a website to extract all the URLs from anchor ( <a> ) tags using the cheerio library. Usage import scrapeWebsite from 'val:damidina.cheerioScraper'; const urls = await scrapeWebsite('https://example.com'); console.log(urls);
stevekrouse avatar
notionDateMeDocs
@stevekrouse
Script
An interactive, runnable TypeScript val by stevekrouse