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.
vtdocs avatar
vtdocs
resyAuth
Script
(Part of: https://www.val.town/v/vtdocs.resyBot) Get a user's auth token and payment methods.
0
arfan avatar
arfan
zARCHIVE_html_Pages
HTTP
// Shared HTML components
0
pomdtr avatar
pomdtr
auth_middleware
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.
1
pomdtr avatar
pomdtr
testBasicAuth
HTTP
An interactive, runnable TypeScript val by pomdtr
2
stevekrouse avatar
stevekrouse
handleFormExample
Script
An interactive, runnable TypeScript val by stevekrouse
0
karfau avatar
karfau
getRedirectToValResponse
Script
Forked from neverstew/thisValUrl
0
rozek avatar
rozek
GDI_ClientInfoService
HTTP
This val is part of a series of examples to introduce "val.town" in my computer science course at Stuttgart University of Applied Sciences . The idea is to motivate even first-semester students not to wait but to put their ideas into practice from the very beginning and implement web apps with frontend and backend. It contains a simple HTTP end point which accepts any kind of HTTP request and responds with a JSON Structure containing some interesting details about the client and its request. This val is the companion of https://rozek-gdi_clientinfo.web.val.run/ which contains the browser part (aka "frontend") for this example. The code was created using Townie - with only a few small manual corrections. This val is licensed under the MIT License.
0
wilt avatar
wilt
arcGISHonoMiddleware
Script
Copy of ArcGISIdentityManager.authorize() , OAuth2 authentication for the ESRI ArcGIS API which is implemented as Express middleware, ported to Hono.
0
stevekrouse avatar
stevekrouse
isValidURL
Script
Check if a URL is valid Returns true if a URL is valid and false if not
0
sebch avatar
sebch
textExtractorAndEmail
HTTP
An interactive, runnable TypeScript val by sebch
0
Skeye avatar
Skeye
API_Get_Weather_In_French
HTTP
An interactive, runnable TypeScript val by Skeye
0
stevekrouse avatar
stevekrouse
alive
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
0
stevekrouse avatar
stevekrouse
auth_middleware
Script
Forked from pomdtr/auth_middleware
0
stevekrouse avatar
stevekrouse
nodeJS_dist
Script
// set at Tue Jan 16 2024 18:37:20 GMT+0000 (Coordinated Universal Time)
0
dthyresson avatar
dthyresson
airportCodeMapRedirector
HTTP
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
0
charmaine avatar
charmaine
googleGeminiAPI
Script
Gemini API A simple and easy to use client for the Gemini API This template shows you how to use the Gemini. This starter template was ported from this one on Docs . To run it: Click Fork on this val Get your Gemini API key Add it to your Environment Variables as GEMINI_API_KEY Click Run on this script val
0