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.
pomdtr avatar
illIndigoVicuna
@pomdtr
HTTP (deprecated)
An interactive, runnable TypeScript val by pomdtr
vtdocs avatar
resyAuth
@vtdocs
Script
(Part of: https://www.val.town/v/vtdocs.resyBot) Get a user's auth token and payment methods.
yo_0 avatar
autocompleteCityByName
@yo_0
Script
An interactive, runnable TypeScript val by yo_0
arrudaricardo avatar
echo_http
@arrudaricardo
HTTP (deprecated)
An interactive, runnable TypeScript val by arrudaricardo
mattx avatar
parse_cookies
@mattx
Script
parse_cookies Parses Cookie headers into objects. jar : Value of the Cookie header decoder : Function to run on all cookie names and values. This is to get around character limitations (see RFC 6265 ). There is no formal standard, but as most sites prefer URL encoding, it is the default. x => x can be used as a way to disable decoding.
rafter avatar
saveFormData
@rafter
Express
Forked from vtdocs/saveFormData
qqyule avatar
uploadImage
@qqyule
Script
Forked from easrng/uploadImage
maxm avatar
resyAuth
@maxm
Script
Forked from vtdocs/resyAuth
devdoshi avatar
validators
@devdoshi
Script
Usage: async (rawInput) => { const validators = await @devdoshi.validators(); const inputSchema = validators.inputSchema(); const input = inputSchema.safeParse(rawInput); }
omgwtfbrblolttyl avatar
writeFileEndpoint
@omgwtfbrblolttyl
Express
TODO: [ ] get token from header [ ] decode using secret from env [ ] look up globs for user with id from token [ ] get path from req.body [ ] test path against all globs for user [ ] if none pass, 403 with message [ ] if any pass, write val to db with path as key (overwrite if exists) [ ] return new value
stevekrouse avatar
resyAuth
@stevekrouse
Script
Forked from vtdocs/resyAuth
supersayan avatar
getAllVideosInYoutubePlaylist
@supersayan
Script
Get All Videos in a Youtube Playlist using the Youtube Data API v3 Reference: https://developers.google.com/youtube/v3/docs/playlistItems/list
nbbaier avatar
getVideoInfo
@nbbaier
Script
Get YT Video Information Given a youtube video url, this val returns a small amount of information about the video: title, channel title, and the description. It uses the Youtube Data API v3, so you need to bring your own API key to get it to work (see here about setting up an API key).
rdimartino avatar
basic_auth
@rdimartino
HTTP (deprecated)
Basic Auth Middleware A middleware for wrapping an HTTP val with Basic authentication. See https://developer.mozilla.org/en-US/docs/Web/HTTP/Authentication See also: https://www.val.town/v/pomdtr/basicAuth for a different approach
karfau avatar
rawUrl
@karfau
Script
A helper for creating the URL to request the raw data of a val, defaulting to use the very nice implementation from @pomdtr.raw . Also look at @karfau.getRaw to get the data of a val inside a val.
pomdtr avatar
auth
@pomdtr
Script
Minimal Auth Middleware Usage import { auth } from "https://esm.town/v/pomdtr/auth"; export default auth(req => Response.json({message: "You are logged in!"}));