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.
glideImportDemo
dvdsgl
glideImportDemo
Glide API 2.0: Bulk Import You can fork this Val to implement your own bulk import to Glide. Glide's high-performance bulk import API can load millions of rows into Big Tables. It's designed for importing your business data into Glide on a regular schedule (e.g. nightly). We designed this API for customers who regularly import tens of thousands of rows or more to Glide using tools like Make. Our goal was to make this process more efficient and less expensive. Note: This API is currently free to use. Future usage will cost approximately 1 update per 10k rows.
glide
dvdsgl
glide
Glide API 2.0 Effects and utility functions for working with Glide API 2.0. Authentication Set glide environment variable to authenticate. If using effect, you can also provide a layer constructed with Glide.layer . Examples Simplest case, use runIngest with an async fetch : import * as Glide from "https://esm.town/v/dvdsgl/glide"; await Glide.importTable({ table: "abc123-def456-ghi789", getRows: async function*() { // yield Row[] to add them to the stash yield [{ Name: "David" }]; }, }); Load 20k pull requests: import * as Glide from "https://esm.town/v/dvdsgl/glide"; await Glide.importTable({ table: "abc123-def456-ghi789", getRows: async function*() { const octokit = new Octokit({ auth: "..." }); for await ( const { data: prs } of octokit.paginate.iterator(octokit.rest.pulls.list, { owner: "glideapps", repo: "glide", state: "all" }) ) yield prs; }, });
VALLErun
tmcw
VALLErun
Remix of: janpaul123/VALLErun
httpValErrorCatcher
janpaul123
httpValErrorCatcher
// This val dynamically imports and executes another HTTP val, then injects error handling scripts.
VALLE
tmcw
VALLE
Remix of: janpaul123/VALLE
isMyWebsiteDown
jermspeaks
isMyWebsiteDown
Remix of: andreterron/isMyWebsiteDown
crypto_prices_info
ghsaboias
crypto_prices_info
Remix of: flafi87/weather_forecast_in_the_morning
smallboatsapi
joseph_c100
smallboatsapi
An API that fetches the html table of small boat arrivals data from the UK gov website. This data is from the last 7 days and updated daily.
upstash
stevekrouse
upstash
An interactive, runnable TypeScript val by stevekrouse
amberPig
tempguy
amberPig
An interactive, runnable TypeScript val by tempguy
ai
kakiagp
ai
An interactive, runnable TypeScript val by kakiagp
playMeASong
dthyresson
playMeASong
Play me a song Search and if we find it, it'll open the song in Spotify! Feeling Lucky? Play a random song . Like a band? Play one of their tracks.
getSpotifyTrackUrl
dthyresson
getSpotifyTrackUrl
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.
tracksAPI
dthyresson
tracksAPI
Remix of: dthyresson/graphQLYoga
playRandomSong
dthyresson
playRandomSong
Play a Random Song ... from a set of Spotify tracks that have been played by me or others using the playMeASong val. Queries a random record of a tracks table and redirects to it's Spotify url. Usage // random const track = await getRandomTrack(); // random for artist const track = await getRandomTrack("Pixies");
graphQLYoga
dthyresson
graphQLYoga
GraphQL Yoga Server GraphQL Yoga from The Guild is a batteries-included cross-platform GraphQL over HTTP spec-compliant GraphQL server powered by Envelop and GraphQL Tools focused on easy setup, performance and great developer experience. Usage To access GraphiQL - the GraphQL Playground - visit the / route. That's what you see in the preview pane below. Configuration and Documentation See the GraphQL Yoga documentation for configuration and all the bells and whistles. Endpoint For this example, we'll set to / to make it easier to demo. However, by default, the GraphQL route is configured to be on /graphql which is more common. const yoga = createYoga({ schema, }) You can set a custom endpoint: const yoga = createYoga({ schema, graphqlEndpoint: "/my-gql", }) Landing Page A landing page is shown be default whenever a 404 is hit. You can disable it via the landingPage option. const yoga = createYoga({ schema, landingPage: false })