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.
swyx avatar
testcase1
@swyx
Script
// export state = () => {
andreterron avatar
azureBird
@andreterron
Script
An interactive, runnable TypeScript val by andreterron
dosirak avatar
starWars
@dosirak
Script
An interactive, runnable TypeScript val by dosirak
prindom avatar
expressHTMLExample
@prindom
Express
// View at https://prindom-expresshtmlexample.express.val.run/?name=Dominik
alvi avatar
ownedGamesToSqlite
@alvi
Cron
Forked from alvi/SteamPlaytimeHistory_playHistoryToSqlite
std avatar
email
@std
Script
Email - Docs β†— Send emails with std/email . You can only send emails to yourself if you're on Val Town Free. If you're on Val Town Pro , you can email anyone. Want to receive emails instead? Create an email handler val Basic usage import { email } from "https://esm.town/v/std/email"; await email({ subject: "New Ink & Switch Post!", text: "https://www.inkandswitch.com/embark/" }); subject The email subject line. It defaults to Message from @your_username on Val Town . to , cc , and bcc By default, the to field is set to the owner of the Val Town account that calls it. If you have Val Town Pro, you can send emails to anyone via the to , cc , and bcc fields. If you don't have Val Town Pro, you can only send emails to yourself, so leave those fields blank. from The from is limited to a few options: It defaults to notifications@val.town if you don't specify it. If you do specify it, it must be of the form: your_username.valname@valtown.email . replyTo replyTo accepts a string email or an object with strings for email and name (optional). This can be useful if you are sending emails to others with Val Town Pro. import { email } from "https://esm.town/v/std/email"; await email({ to: "someone_else@example.com", from: "your_username.valname@valtown.email", replyTo: "your_email@example.com", text: "these pretzels are making me thirsty", }); Attachments You can attach files to your emails by using the attachments field. Attachments need to be Base64 encoded, which is that the btoa method is doing in this example: import { email } from "https://esm.town/v/std/email"; export const stdEmailAttachmentExample = email({ attachments: [ { content: btoa("hello attachments!"), filename: "test.txt", type: "text", disposition: "attachment", }, ], }); Here's an example sending a PDF . πŸ“ Edit docs
stevekrouse avatar
getPublicKey
@stevekrouse
Script
An interactive, runnable TypeScript val by stevekrouse
ajax avatar
resume
@ajax
Script
// set by ajax.resumeHtml at 2023-06-07T20:30:59.005Z
kutay25 avatar
pollRSSFeeds
@kutay25
Cron
Forked from stevekrouse/pollRSSFeeds
darcy avatar
sus
@darcy
Script
An interactive, runnable TypeScript val by darcy
stevekrouse avatar
infoboxCrawler
@stevekrouse
HTTP
Forked from jdan/infoboxCrawler
stevekrouse avatar
vtDiscordServerId
@stevekrouse
Script
An interactive, runnable TypeScript val by stevekrouse
tfayyaz avatar
react_framer_motion_script
@tfayyaz
Script
Forked from tfayyaz/reacttldrawclient
zackoverflow avatar
fetchValCode
@zackoverflow
Script
An interactive, runnable TypeScript val by zackoverflow
thomasatflexos avatar
generateEmbeddings
@thomasatflexos
Script
An interactive, runnable TypeScript val by thomasatflexos
janpaul123 avatar
valle_tmp_115772121902645334646172151872623
@janpaul123
HTTP (deprecated)
* This val creates a simple hacker news clone with 30 fake sample stories. * It uses blob storage to store story data, including the ability to submit * new stories and upvote existing stories.