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.
brenton avatar
holidaysUS
@brenton
Script
// Public holidays in the US in 2023
moe avatar
spacexchart
@moe
Script
An interactive, runnable TypeScript val by moe
raymperry avatar
usdGBP
@raymperry
Script
// Convert 100 British pounds to US dollars
stevekrouse avatar
usdGBP
@stevekrouse
Script
// Convert 100 British pounds to US dollars
jbwinters avatar
ForestryFinancialModel
@jbwinters
HTTP
// Interactive forestry financial model simulator.
mcarter00 avatar
githubStarred
@mcarter00
Script
// GitHub starred repos
testhandle avatar
holidaysUS
@testhandle
Script
// Public holidays in the US in 2023
vinspee avatar
usdGBP
@vinspee
Script
// Convert 100 British pounds to US dollars
frankdilo avatar
convertCurrency
@frankdilo
Script
Forked from stevekrouse/currency
ernest avatar
currency
@ernest
Script
An interactive, runnable TypeScript val by ernest
bdon avatar
usd_twd_converter
@bdon
Cron
Forked from stevekrouse/currency
stevekrouse avatar
aqi
@stevekrouse
Cron
AQI Alerts Get email alerts when AQI is unhealthy near you. Set up Click Fork Change location (Line 4) to describe your location. It accepts fairly flexible English descriptions which it turns into locations via nominatim's geocoder API . Click Run Background This val uses nominatim's geocoder to get your lat, lon, and air quality data from OpenAQ. It uses EPA's NowCast AQI Index calculation and severity levels. Learn more: https://www.val.town/v/stevekrouse.easyAQI
std avatar
openai
@std
Script
OpenAI - Docs ↗ Use OpenAI's chat completion API with std/openai . This integration enables access to OpenAI's language models without needing to acquire API keys. For free Val Town users, all calls are sent to gpt-4o-mini . Usage import { OpenAI } from "https://esm.town/v/std/openai"; const openai = new OpenAI(); const completion = await openai.chat.completions.create({ messages: [ { role: "user", content: "Say hello in a creative way" }, ], model: "gpt-4", max_tokens: 30, }); console.log(completion.choices[0].message.content); Limits While our wrapper simplifies the integration of OpenAI, there are a few limitations to keep in mind: Usage Quota : We limit each user to 10 requests per minute. Features : Chat completions is the only endpoint available. If these limits are too low, let us know! You can also get around the limitation by using your own keys: Create your own API key on OpenAI's website Create an environment variable named OPENAI_API_KEY Use the OpenAI client from npm:openai : import { OpenAI } from "npm:openai"; const openai = new OpenAI(); 📝 Edit docs
ubyk avatar
netPinkSole
@ubyk
Cron
Forked from stevekrouse/btcPriceAlert
mattx avatar
verify_discord_signature
@mattx
Script
verify_discord_signature Verify HTTP signatures coming from Discord. public_key should be the Ed25519 public key from Discord, as a hex string body should be the request body as a string. If you have a JSON object as the request body, use JSON.stringify. signature should be the X-Signature-Ed25519 header timestamp should be the X-Signature-Timestamp header You must return a 401 error and return early if this function returns false, otherwise you will pretty quickly get a big scary warning from Discord that your endpoint has been removed. Note that you'll only be able to add one once you've integrated this correctly. As this function only deals with strings, it doesn't matter whether you use an Express or web endpoint.
bmhimes avatar
First
@bmhimes
Script
Forked from talha_husnain/First