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.
webdavServer
@pomdtr
Script
Webdav Manage your vals from a webdav client (ex: https://cyberduck.io/) ⚠️ some webdav operations are not supported, so support can vary between clients. Installation Click "Create Val" on the code block, and change it's type to http. import { basicAuth } from "https://esm.town/v/pomdtr/basicAuth";
import { verifyToken } from "https://esm.town/v/pomdtr/verifyToken";
import { serveVals } from "https://esm.town/v/pomdtr/webdavServer";
export default basicAuth(serveVals, {
verifyUser: (user) => {
return verifyToken(user);
},
}); Use a val town token as the username, and keep the password blank to authenticate.
licenseBadge
@vladimyr
HTTP (deprecated)
Val license badge generator Generates readme badge from SPDX-License-Identifier comment. ![](https://vladimyr-licensebadge.web.val.run/v/vladimyr/licenseBadge) Usage https://vladimyr-licensebadge.web.val.run/v/<author>/<val> Example https://vladimyr-licensebadge.web.val.run/v/vladimyr/licenseBadge https://vladimyr-licensebadge.web.val.run/v/vladimyr/valshot https://vladimyr-licensebadge.web.val.run/v/vladimyr/base256kitten
filterVals
@nbbaier
Script
filterVals This val exports a utility function that returns a list of all a user's val, filtered by a callback function. Example Get the names of all your private vals: import { filterVals } from "https://esm.town/v/nbbaier/filterVals";
const id = <user_id>
const vals = await filterVals(id, (v) => v.privacy === "private")
const privateValNames = vals.map(v => v.name);