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.
stevekrouse avatar
stevekrouse
beigeSawfish
HTTP
Forked from stevekrouse/compress_response
0
niek avatar
niek
Fetch
HTTP
Forked from hunty/Fetch
0
janpaul123 avatar
janpaul123
valle_tmp_52909322274216213030085201031243
HTTP
// This val greets the user with their inputted name
0
AIWB avatar
AIWB
backupSQLiteDB_cron
Cron
Database Backup Cron Script This cron script is designed to automatically backup specific database tables using the backupSQLiteDB function. It groups tables and stores them as blobs for easy retrieval and management. Overview The script imports a backupDatabase function from an external module and uses it to perform regular backups of specified database tables. It's set up as a cron job to run at scheduled intervals, ensuring your database is consistently backed up. Main Function: handleBackup The handleBackup function is the core of this script. It takes the following parameters: DATABASE_PREFIX (string): The prefix used for the database tables. DATABASE_TABLES (string[]): An array of table names to be backed up. DATABASE_SUFFIX (string, optional): A suffix to be added to the database names. Imported Function The script relies on the backupDatabase function imported from: import backupDatabase from "https://esm.town/v/AIWB/backupSQLiteDB";
0
stevekrouse avatar
stevekrouse
getDateMeDatabase
Script
An interactive, runnable TypeScript val by stevekrouse
0
olawale avatar
olawale
umbrellaReminder
Cron
Forked from stevekrouse/umbrellaReminder
0
stevekrouse avatar
stevekrouse
lookup
HTTP
Lookup the val behind an http val URL Example usage: https://stevekrouse-lookup.web.val.run/https://nbbaier-servepdf.web.val.run/download
1
justwph avatar
justwph
myApi
Script
An interactive, runnable TypeScript val by justwph
0
stevekrouse avatar
stevekrouse
groupBy
Script
! * Group items from an array together by some criteria or value. * (c) 2019 Tom Bremmer (https://tbremer.com/) and Chris Ferdinandi (https://gomakethings.com), MIT License, * @param {Array} arr The array to group items from * @param {String|Function} criteria The criteria to group by * @return {Object} The grouped object
0
stevekrouse avatar
stevekrouse
fileInputUploadExample
HTTP
Example of an HTML Form with a File Upload, handled by the server The key step was setting enctype="multipart/form-data" on the <form> element. If you skip that step, you'll only get the file's name on the server. Limitation on files > 1mb Currently (as of 4/14/24) this only works for small files (< 1mb). For larger files you get an error: {"statusCode":413,"error":"Payload Too Large","message":"request entity too large"} . A workaround is to upload to another service client-side, send the URL from that service to your Val Town server, and then fetch the file server-side (helper: @stevekrouse/uploadTo0x0).
0
agmm avatar
agmm
headers
HTTP
An interactive, runnable TypeScript val by agmm
0
niek avatar
niek
zestyPurplePanda
HTTP
Forked from hunty/Fetch
0
pmo avatar
pmo
fetchWikipediaContent
HTTP
Forked from jamiedubs/wikipediaPage
0
janpaul123 avatar
janpaul123
valle_tmp_36549593302312316221638155580223
HTTP
// This val serves an HTML page with an input field to enter a name. Upon form submission, it greets the user with the entered name.
0
ynonp avatar
ynonp
gsheet_call
Script
Forked from gwelinder/gsheet_call
0
nmsilva avatar
nmsilva
sendSMS
Script
Forked from iamseeley/sendSMS
0