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.
tarasyarema avatar
tarasyarema
tgWebhookHandler
HTTP
An interactive, runnable TypeScript val by tarasyarema
0
stevekrouse avatar
stevekrouse
dateMeDocs
Script
An interactive, runnable TypeScript val by stevekrouse
0
taras avatar
taras
scrape2md
HTTP
This is a deno/valtown port in progress of https://github.com/tarasglek/scrape2md License: MIT Handy script to scrape various data sources into markdown. Intended to feed llms in https://chatcraft.org Usage: https://taras-scrape2md.web.val.run/ + URL_TO_SCRAPE Or just visit in browser and paste your url TODO https://chatcraft.org/api/share/tarasglek/IDYChVAilfePgVZb_T5pH POST from browser https://www.val.town/v/nbbaier/valToGH sync to github Metadata for use with https://github.com/tarasglek/valtown2js: { "typeCheck": false, "mappings": { "https://esm.sh/linkedom": { "name": "linkedom", "version": "^0.16.8" } }, "package": { "name": "scrape2md", "version": "1.0.0", "devDependencies": { "@types/turndown": "^5.0.4" } } }
1
just_be avatar
just_be
wasmExample
HTTP
An interactive, runnable TypeScript val by just_be
0
oluwadarejohn avatar
oluwadarejohn
jobAndChatApp
HTTP
@jsxImportSource https://esm.sh/react@18.2.0
0
zebrainy avatar
zebrainy
getAppleDevice
Express (deprecated)
An interactive, runnable TypeScript val by zebrainy
0
pomdtr avatar
pomdtr
lastlogin
Script
Lastlogin Authentication for val.town Looking for an hono integration ? See @pomdtr/lastloginHono Support login in trough: Email Link QR Code Google Oauth Github Oauth Gitlab Oauth Facebook Oauth Demo You can try a demo at https://pomdtr-lastloginhonoexample.web.val.run (see @pomdtr/lastLoginHonoExample for code) Usage Wrap your http handlers in a lastlogin middleware (sessions will be persisted in the lastlogin_session table on your sqlite account). If you want to be the only one able to access your val, you can use @pomdtr/verifyUserEmail. import { lastlogin } from "https://esm.town/v/pomdtr/lastlogin"; import { verifyUserEmail } from "https://esm.town/v/pomdtr/verifyUserEmail"; export default lastlogin((req) => { return new Response(`You are logged in as ${req.headers.get("X-LastLogin-Email")}`); }, { // check that the user email match your val town email verifyEmail: verifyUserEmail }); If you want to customize how is allowed to signup, you can set the verifyEmail option: import { lastlogin } from "https://esm.town/v/pomdtr/lastlogin"; export default lastlogin((req) => { return new Response(`You are logged in as ${req.headers.get("X-LastLogin-Email")}`); }, { verifyEmail: (email) => { email == "steve@valtown" } }); You can allow anyone to signup by returning a boolean from the verifyEmail function: import { lastlogin } from "https://esm.town/v/pomdtr/lastlogin"; export default lastlogin((req) => { return new Response(`You are logged in as ${req.headers.get("X-LastLogin-Email")}`); }, { verifyEmail: (_email) => true }); Public Routes import { lastlogin } from "https://esm.town/v/pomdtr/lastlogin"; import { verifyUserEmail } from "https://esm.town/v/pomdtr/verifyUserEmail"; export default lastlogin(() => { return new Response("Hi!"); }, { verifyEmail: verifyUserEmail, public_routes: ["/", "/public/*"], }); See the URLPattern API for reference. Logout Just redirect the user to /auth/logout
10
stevekrouse avatar
stevekrouse
username
Script
// set by stevekrouse.store at 2023-09-21T20:22:10.795Z
0
stevekrouse avatar
stevekrouse
openaiFineTuneData
Script
An interactive, runnable TypeScript val by stevekrouse
0
Kpool avatar
Kpool
KPoolCafeGameMenu
Cron
@jsxImportSource https://esm.sh/react@18.2.0
0
tmcw avatar
tmcw
getDuckDB
Script
Get a DuckDB database This method sets up a duckdb-wasm database that you can then use to store and retrieve data.
5
tmcw avatar
tmcw
z85example
Script
z85 example The z85 encoding is similar to the Ascii85 encoding. They're both ways to encode binary data as strings, but with different limitations and strengths. Base64 is a more common way to encode strings, but z85 and Ascii85 use more characters and can thus be a little more efficient - but at the cost of including characters that might be dangerous to use in some contexts. For example, Ascii85 includes the \ character, which is used for character escapes in many contexts.
0
postpostscript avatar
postpostscript
jwks
HTTP
jwks Required Setup Fork this val Set JWKS Environment Variables Go to https://postpostscript-generatejwksenv.web.val.run/?prefix=JWKS Follow the steps there with the prefix "JWKS" If you want to set the keys up manually, set up env vars JWKS_PRIVATE and JWKS_PUBLIC as JWKS with the algorithm RS512 in this format: { "keys": [ { ... } ] }
0
rajasiii avatar
rajasiii
piyush_will_you_be_my_
HTTP
Forked from mewtru/valentine
0
jonataaroeira avatar
jonataaroeira
webgen
HTTP
Forked from thesephist/webgen
0
stevekrouse avatar
stevekrouse
valtownApiTypesImportTest
Script
// Forked from @nbbaier.valtownApiTypesImportTest
0