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.
janpaul123 avatar
janpaul123
valle_tmp_239473183576900634635727013442197
HTTP
// This val responds with an HTML form for users to input their name and get a greeting
0
cicciocappa avatar
cicciocappa
ModuloCreazioneIntimita
HTTP
@jsxImportSource https://esm.sh/react
0
lostme avatar
lostme
httpHelloWorldResponse
Script
An interactive, runnable TypeScript val by lostme
0
nbbaier avatar
nbbaier
removeTrackingParams2
Script
Forked from nbbaier/removeTrackingParams
0
romanewmedia avatar
romanewmedia
api
HTTP
An interactive, runnable TypeScript val by romanewmedia
0
yawnxyz avatar
yawnxyz
lucia_middleware_safe
Script
Forked from stevekrouse/lucia_middleware_safe
1
madmod avatar
madmod
nameNationality
Script
// Predict the nationality of a name
0
karfau avatar
karfau
testRunner
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.
3
pomdtr avatar
pomdtr
astro
HTTP
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.
5
tmcw avatar
tmcw
openstreetmapAPIexample
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 .
0
stevekrouse avatar
stevekrouse
getMe
Script
An interactive, runnable TypeScript val by stevekrouse
0
dthyresson avatar
dthyresson
getSpotifyTrackUrl
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.
0
vyatka avatar
vyatka
WebSiteReact
HTTP
Forked from jdan/latLngOfCity
0
toowired avatar
toowired
deployBackend
Script
An interactive, runnable TypeScript val by toowired
0
janpaul123 avatar
janpaul123
valle_tmp_666337142910866227920627432385037
HTTP
// This val responds with an HTML form styled with CSS to input the user's name and greets them upon form submission
0
pomdtr avatar
pomdtr
verifyEmail
Script
Forked from pomdtr/verifyToken
0