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.
vtdocs avatar
generateInvoicePDF
@vtdocs
Script
An interactive, runnable TypeScript val by vtdocs
stevekrouse avatar
price
@stevekrouse
Script
An interactive, runnable TypeScript val by stevekrouse
std avatar
sqlite
@std
Script
SQLite - Docs ↗ SQLite is a lightweight, standard database. Every Val Town account comes with its own private SQLite database that is accessible from any of your vals via std/sqlite . Val Town SQLite is powered by Turso . Usage Migrations ORMs You may find these admin viewers helpful managing your database: SQLite Explorer (built in Val Town) LibSQL Studio Limits You can store 10mb on the free plan and up to 1gb on the paid plan. Contact us if you need more space. 📝 Edit docs
alexandre avatar
getAaveV2Liquidations
@alexandre
Script
An interactive, runnable TypeScript val by alexandre
onemanwenttomow avatar
getCohortRecentCommits
@onemanwenttomow
Script
An interactive, runnable TypeScript val by onemanwenttomow
yawnxyz avatar
valWall
@yawnxyz
HTTP
Forked from iamseeley/valcontributionchart
aeaton avatar
companiesHousePublicData
@aeaton
HTTP (deprecated)
An interactive, runnable TypeScript val by aeaton
jamisonl avatar
aloneBronzeCattle
@jamisonl
HTTP (deprecated)
Forked from camajudson/handleDiscordInteraction
bojan avatar
btcPriceAlert
@bojan
Cron
Forked from stevekrouse/btcPriceAlert
jamisonl avatar
ruralCrimsonGuppy
@jamisonl
HTTP (deprecated)
Forked from camajudson/handleDiscordInteraction
stevekrouse avatar
ideas
@stevekrouse
HTTP (deprecated)
Request for vals Here's my personal list of things I want to see on Val Town. I may build them myself at some point, but to the glory goes the person who builds it first. If you want to collaborate or get clarification on any of these ideas, please drop me a comment or reach out on discord. Status Page Possibly the singular most popular thing to do on Val Town is to build a downtime detector for your website. This one from @healeycodes is super popular as well as this fork by @andreterron . Sites like cronitor do this and also seamlessly provide a status page as well, for example like this one: https://status.val.town/. It would be awesome if we built a fork of these downtime detectors that also stored historical uptime/downtime (and possibly latency) information in sqlite, and then provided an http interface to view the data as well. Free Stock API Proxy I have been working on a stock price api tool, initially for use within Google Sheets: https://www.val.town/v/stevekrouse/stockPrice It would be awesome to expand this to also be useful to other folks, ie folks within Val Town. For example, it could be used to build stock price trackers. Our BTC price tracker is pretty popular. I think one for stocks would be similarly popular, but it'd need someone to provide a good free stock API. Maybe one exists or maybe we need to proxy it.
std avatar
fetch
@std
Script
Proxied fetch - Docs ↗ The Javascript Fetch API is directly available within a Val. However sometimes fetch calls are blocked by the receiving server for using particular IP addresses. Additionally, network blips or unreliable web services may lead to failures if not handled properly. The Val Town standard library contains an alternative version, std/fetch , that wraps the JavaScript Fetch API to provide additional functionality. The fetch function from std/fetch reroutes requests using a proxy vendor so that requests obtain different IP addresses. It also automatically retries failed requests several times. Note that using std/fetch will be significantly slower than directly calling the Javascript Fetch API due to extra network hops. Usage After importing std/fetch , the fetch method is used with the same signature as the Javascript Fetch API. import { fetch } from "https://esm.town/v/std/fetch"; let result = await fetch("https://api64.ipify.org?format=json"); let json = await result.json(); console.log(json.ip); If you run the above code multiple times, you'll see that it returns different IP addresses, because std/fetch uses proxies so that each request is made from a different IP address. 📝 Edit docs
ubyk avatar
grossSalmonCanid
@ubyk
Cron
Forked from stevekrouse/btcPriceAlert
marksteve avatar
checkEpicTvDiscounts
@marksteve
Script
An interactive, runnable TypeScript val by marksteve
patrickjm avatar
gpt3
@patrickjm
RPC
* OpenAI text completion. https://platform.openai.com/docs/api-reference/completions * * val.town has generously provided a free daily quota. Until the quota is met, no need to provide an API key. * To see if the quota has been met, you can run @patrickjm.openAiFreeQuotaExceeded() * * For full REST API access, see @patrickjm.openAiTextCompletion
iamseeley avatar
valWall
@iamseeley
HTTP
Forked from yawnxyz/valWall