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.
tomas_padrieza avatar
reactEmailTemplate
@tomas_padrieza
Script
Simple demo of a React Email rendering
nbbaier avatar
removeTrackingParams2
@nbbaier
Script
Forked from nbbaier/removeTrackingParams
madmod avatar
nameNationality
@madmod
Script
// Predict the nationality of a name
postpostscript avatar
authIdBase
@postpostscript
Script
An interactive, runnable TypeScript val by postpostscript
yawnxyz avatar
lucia_middleware_safe
@yawnxyz
Script
Forked from stevekrouse/lucia_middleware_safe
karfau avatar
testRunner
@karfau
Script
Test runner to be able to run a number of tests (e.g. on a different val). check the references for seeing how it is used. It is extracted into a val to avoid having all that clutter in the same val as your tests. Each test is a named function (which can be async), the name is used as the name for the test. the input passed as the first argument is passed to each test, great for importing assertion methods, stubs, fixed values, ... everything that you do not mutate during a test if a function is async (it returns a promise) there is a timeout of 2 seconds before the test is marked as failed. all tests are called in the declared order, but async tests run in parallel afterwards, so don't assume any order if a test starts with skip it is not executed if a test fails it throws the output, so it appears in the read box below the val and the evaluation/run is marked red if all tests pass it returns the output, so it appears in the grey box and the evaluation/run is marked green. Note: If you are using the test runner to store the result in that val, as described above, it is considered a "JSON val" and has a run button, but it also means that another of your vals could update the val with just any other (JSON) state. Alternatively you can define a function val that calls the test runner and have a separete val to keep the curretn test results, but it means after updating the tests you need to fest save that val and then reevaluate to val storing the test state.
syhner avatar
extractValInfo
@syhner
Script
Forked from pomdtr/extractValInfo
pomdtr avatar
astro
@pomdtr
HTTP (deprecated)
Astro served from Val Town (with SSR) ! The ultimate goal would be to serve it if from jsr, but the deno astro adapter still relies on deno.land.
tmcw avatar
openstreetmapAPIexample
@tmcw
Script
Requesting data from the OpenStreetMap API The OpenStreetMap API allows both unauthenticated public reads and writes using authentication tokens. This example shows us getting the first node ever created in the project, which was last edited by owene .
dthyresson avatar
getSpotifyTrackUrl
@dthyresson
Script
getSpotifyTrackUrl Get a Spotify Track Url using the Spotify Web API given an artist and a song title. Track info is cached by the query and also the spotify track id, so your popular queries won't have to fetch from Spotify over and over. Examples import { getSpotifyTrackUrl } from "https://esm.town/v/dthyresson/getSpotifyTrackUrl"; const reni = await getSpotifyTrackUrl("Stone Roses", "Fools Gold"); const ian = await getSpotifyTrackUrl("Joy Division", "Love Will Tear Us Apart"); const kim = await getSpotifyTrackUrl("Pixies", "Velouria"); console.log(reni) console.log(ian) console.log(kim) Info Uses getSpotifyAccessToken which requires you to set environment variables from your Spotify Developers account. SPOTIFY_CLIENT_ID SPOTIFY_CLIENT_SECRET Your access token is cached by getSpotifyAccessToken to avoid fetching over and over.
stevekrouse avatar
getMe
@stevekrouse
Script
An interactive, runnable TypeScript val by stevekrouse
substrate avatar
promptHeader
@substrate
HTTP (deprecated)
Forked from substrate/substrateBadge
sedson avatar
blob_admin
@sedson
HTTP (deprecated)
Forked from stevekrouse/blob_admin
janpaul123 avatar
valle_tmp_666337142910866227920627432385037
@janpaul123
HTTP (deprecated)
// This val responds with an HTML form styled with CSS to input the user's name and greets them upon form submission
xkonti avatar
extractHttpEndpoint
@xkonti
Script
Forked from pomdtr/extractValInfo
wfortin avatar
myApi
@wfortin
Script
An interactive, runnable TypeScript val by wfortin