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
vtdocs
supabaseSDKInsertIntoMyFirstTable
Script
Inserting into a table using Supabase's SDK. Part of the Supabase guide on docs.val.town .
0
janpaul123 avatar
janpaul123
valle_tmp_0487415013235574836936016911203917
HTTP
// This val creates a simple Wordle clone with a highly stylized CSS.
0
janpaul123 avatar
janpaul123
valle_tmp_083767942019955377815896098916415
HTTP
// This val responds to HTTP requests with a colorful HTML message using gradients
0
stevekrouse avatar
stevekrouse
textToImageDalle
Script
Forked from hootz/textToImageDalle
0
easrng avatar
easrng
kyselyVtDialect
Script
Kysely Dialect for @std/sqlite Caveats It doesn't support transactions, there's no real way to do them on top of @std/sqlite AFAICT. Usage import { VtDialect } from "https://esm.town/v/easrng/kyselyVtDialect"; import { Kysely } from "npm:kysely"; const db = new Kysely({ dialect: new VtDialect(), }); Demo See @easrng/kyselyVtDemo, which uses this along with @easrng/kyselyVtTypes to generate schema types.
1
zackoverflow avatar
zackoverflow
lisp
Script
Lispaas (lisp as a service) A mini lisp interpreter How to use: To execute code: const result = @zackoverflow.lisp(" (+ 1 2)") To just parse and return the AST: const ast = @zackoverflow.lisp("(+ 1 2)", true) The value returned is the last expression of the program, for example: const lispResult = @zackoverflow.lisp("(+ 1 2) (+ 400 20)") console.log('Val', lispResult.val === 420) Example: Compute Fibonacci sequence let result = @zackoverflow.lisp(` (defun fib (x) (if (<= x 1) x (defun impl (i n-1 n-2) (if (= x i) (+ n-1 n-2) (impl (+ i 1) (+ n-1 n-2) n-1))) (impl 2 1 0))) (assert-eq 0 (fib 0)) (assert-eq 1 (fib 1)) (assert-eq 1 (fib 2)) (assert-eq 2 (fib 3)) (assert-eq 3 (fib 4)) (assert-eq 5 (fib 5)) (assert-eq 8 (fib 6)) (assert-eq 13 (fib 7)) `); Documentation Functions You can define a function like so: (defun hello (x) (print x)) Rest/variadic arguments are also supported (defun variable-amount-of-args (...args) (print args)) (variable-amount-of-args "Hello" "World!") Lists Define a list like so: (let ((my-list (list 1 2 3 4))) (print my-list) (print (list-get my-list 1))) Internally, a list is just a Javascript array. So indexing is O(1), but that does mean cdr requires copying (vs the linked list implementation). Plists Property lists, or records. Internally these are Javascript objects. Create a plist like so: (set null :key "Value") TODO
2
stevekrouse avatar
stevekrouse
createVal
Script
An interactive, runnable TypeScript val by stevekrouse
0
mikaello avatar
mikaello
timeCalculator
HTTP
@jsxImportSource https://esm.sh/react
0
stevekrouse avatar
stevekrouse
dot_com
HTTP
Forked from stevekrouse/stevekrouse_minimal
3
tmcw avatar
tmcw
arenaApiExample
Script
Are.na API Example of using the are.na API to get the contents of an Are.na board - specifically my fun board that showcases websites with that "glossy black style." All you need is fetch to make this happen!
0
stevekrouse avatar
stevekrouse
anthropicStreamDemo
HTTP
An interactive, runnable TypeScript val by stevekrouse
2
iamseeley avatar
iamseeley
multirouteSvelte
HTTP
🌐 Multi-Route Website with Svelte
1
jdan avatar
jdan
grayWildfowl
Script
Forked from jdan/weatherBot
0
shreyasmakes avatar
shreyasmakes
aqi
Cron
Forked from stevekrouse/aqi
0
stevekrouse avatar
stevekrouse
lucia_adapter_base
Script
Forked from pomdtr/lucia_adapter_base
1
TeemoCodes avatar
TeemoCodes
Valentines_project
HTTP
Forked from mewtru/valentine
1