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.
karfau avatar
karfau
rawUrl
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.
1
pomdtr avatar
pomdtr
auth
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!"}));
2
rozek avatar
rozek
vtu_createUser
Script
(documentation follows)
0
zarutian avatar
zarutian
gardland
HTTP
// til minnis: þarf að uppfæra þetta til að nota Hano
1
rozek avatar
rozek
HTTP_URLParser
HTTP
An interactive, runnable TypeScript val by rozek
0
pomdtr avatar
pomdtr
password_auth_example
HTTP
0
yieldray avatar
yieldray
serve_router
HTTP
serve-router Example https://yieldray-serve_router.web.val.run https://yieldray-serve_router.web.val.run/user/ray https://yieldray-serve_router.web.val.run/headers https://yieldray-serve_router.web.val.run/api https://yieldray-serve_router.web.val.run/api/one
0
pomdtr avatar
pomdtr
verifyUserEmail
Script
Check that a string match your profile email
0
stevekrouseTest avatar
stevekrouseTest
willingSapphireBoa
HTTP
This endpoint fetches the current weather for a given location using the Open-Meteo API. Pass latitude and longitude as query parameters.
0
stevekrouse avatar
stevekrouse
notionGetDatabase
Script
Get all the pages in a notion database Usage Find your databaseId : https://developers.notion.com/reference/retrieve-a-database Get auth by setting up an internal integration: https://developers.notion.com/docs/authorization#internal-integration-auth-flow-set-up Example usage: @stevekrouse.dateMeNotionDatabase deno-notion-sdk docs: https://github.com/cloudydeno/deno-notion_sdk
4
nbbaier avatar
nbbaier
paginatedResponse
Script
Return a paginated response A helper function to take an array and return a paginated response. This is useful when defining one's own folders for pomdtr's vscode extension . Usage: const data = [...] export default async function(req: Request): Promise<Response> { return paginatedResponse(req, data); }
1
mxdvl avatar
mxdvl
haversine_distance
Script
Implementation of the Haversine formula for calculating the great circle distance between two points on a sphere. If no radius is provided, the average Earth’s radius is used with a value of 6371km.
0
pomdtr avatar
pomdtr
page
HTTP
Render a val readme Inspired by github pages. Use https://pomdtr-page.web.val.run/v/<author>/<name> Example You can see this val readme at https://pomdtr-page.web.val.run/v/pomdtr/readme
1
stevekrouseTest avatar
stevekrouseTest
getWeather
HTTP
This endpoint fetches the current weather for a given location using the Open-Meteo API. Pass in a location object with latitude and longitude.
0
rozek avatar
rozek
GDI_FormUploadService
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 expects values from an HTML form that were submitted in a POST request. The values are collected in a JSON structure and then sent back to the client. This val is the companion of https://rozek-gdi_formupload.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
stevekrouse avatar
stevekrouse
blob_delete_by_prefix
Script
Delete blobs by prefix Utility to delete your blobs by prefix
0