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
stevekrouse
val_town_client
Script
Forked from pomdtr/val_town_client
0
austinchappell avatar
austinchappell
myApi
Script
An interactive, runnable TypeScript val by austinchappell
0
kuomory avatar
kuomory
violetWarbler
HTTP
An interactive, runnable TypeScript val by kuomory
0
ibodev avatar
ibodev
extractValInfo
Script
Forked from pomdtr/extractValInfo
0
andybak avatar
andybak
unicodeToSVG
HTTP
An interactive, runnable TypeScript val by andybak
1
pomdtr avatar
pomdtr
getValVersion
Script
Forked from neverstew/getValVersion
0
simplescraper avatar
simplescraper
aiEmailAssistant
Email
Email AI Assistant Chat with your favorite AI via email (with PDF attachment support) What It Does This script allows you to: Send emails to OpenAI. The text will be treated as the prompt Parse PDF attachments and include their contents in the AI's analysis. Get response directly to your inbox. Setup guide Copy this Val and save it as an Email Val (choose Val type in top-right corner of editor) Add your OpenAI API key to line 8 (or use an environment variable: https://docs.val.town/reference/environment-variables/) Copy the email address of the Val (click 3 dots in top-right > Copy > Copy email address) Write your email, include any attachments, and send it to the Val email address. The AI will respond after a few seconds.
0
stevekrouse avatar
stevekrouse
email
Script
Moved to @std.email .
0
temptemp avatar
temptemp
cfetch
Script
// using cf cache to speed up things.
0
neverstew avatar
neverstew
finalUrl
HTTP
Final URL I keep getting tracking links as part of emails. They suck! Use Val Town as a tracking shield - call this val and get redirected to the final URL at the end of the redirection chain without picking up trackers along the way. https://neverstew-finalurl.web.val.run/<tracking_link> Example The Glastonbury registration lookup link. https://neverstew-finalurl.web.val.run/https://scke65qh.r.eu-west-1.awstrack.me/L0/https:%2F%2Fglastonbury.seetickets.com%2Fregistration%2Flookup/2/01020189fe6dd832-f894deea-eab7-4d1d-8c6a-0818e87ac95c-000000/8f6rVLcCc3v6CQNroYC81q9YkaU=335
0
serkanokur avatar
serkanokur
weatherGPT
Cron
Forked from stevekrouse/weatherGPT
0
rozek avatar
rozek
GDI_FormUpload
HTTP
Forked from rozek/GDI_FileUpload
0
postpostscript avatar
postpostscript
authMiddleware
Script
authMiddleware: middleware to protect your HTTP val Todo [ ] Human readable JWT claim validation errors
0
janpaul123 avatar
janpaul123
valle_tmp_5348120470989651484969606140059
HTTP
// This val responds with an HTML form to input the user's name and greets them upon form submission
0
jdan avatar
jdan
honoBasicAuthMiddleware
Script
honoBasicAuthMiddleware You should use https://hono.dev/middleware/builtin/basic-auth instead. Used to authenticate your HTTP vals build with Hono behind a username/password challenge. Browsers store this information alongside your other passwords. Usage In basicAuthButton , I secure two routes (one for viewing a value, one for updating it) behind a username/password combo stores in my Env variables. /** @jsxImportSource npm:hono@3/jsx */ import { honoBasicAuthMiddleware } from "https://esm.town/v/jdan/honoBasicAuthMiddleware"; import { blob } from "https://esm.town/v/std/blob?v=12"; import { Hono } from "npm:hono"; /** Authenticate the URL */ const secretUsername = Deno.env.get("BUTTON_USERNAME"); const secretPassword = Deno.env.get("BUTTON_PASSWORD"); app.use(honoBasicAuthMiddleware(secretUsername, secretPassword)); app.get("/", async (c) => { const lastPressed = await blob.getJSON(blobStorageKey) || "Never"; return c.html( <div> <h1>Last Pressed: {lastPressed}</h1> <form method="POST" action="/press"> <input type="submit" /> </form> </div>, ); });
0
jollytoad avatar
jollytoad
helloWorld
HTTP
Hello world server, using http functions . Try hitting URLs such as: /world , /world.txt , /world.json , /world.html , or even /<script>.html . This demonstrates how you can import and compose simple functions to construct a router to route based on various aspects of a request, ie. the URL path, method, and even on media-types based on path extension or the Accept header. See routing functions , and response helpers on JSR. For a more detailed guide on building a Deno app, including things like fs based routing, with these fns see... https://jollytoad.deno.dev/blog/http_getting_started
0