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
wikidata
@stevekrouse
Script
Query Wikidata via SPARQL Usage // get the death date for a person @stevekrouse.wikidata(`SELECT ?person ?personLabel ?death_date WHERE { ?person rdfs:label "Henry Kissinger"@en; wdt:P31 wd:Q5 . # Ensure the entity is a human OPTIONAL { ?person wdt:P570 ?death_date . # Try to find a date of death } SERVICE wikibase:label { bd:serviceParam wikibase:language "[AUTO_LANGUAGE],en". } }`) Learn more https://agg-shashank.medium.com/an-introduction-to-using-wikidata-apis-a678ee6d2968
pomdtr avatar
bearerAuth
@pomdtr
Script
An interactive, runnable TypeScript val by pomdtr
vladimyr avatar
json_viewer
@vladimyr
Script
Forked from stevekrouse/json_viewer
stevekrouse avatar
uploadTo0x0
@stevekrouse
Script
Forked from easrng/uploadTo0x0
vhmartinezm avatar
blob_admin
@vhmartinezm
HTTP (deprecated)
Forked from stevekrouse/blob_admin
iamseeley avatar
blob_admin
@iamseeley
HTTP (deprecated)
Forked from stevekrouse/blob_admin
wilt avatar
pug
@wilt
Script
Pug HTML Template Renderer This function is equivalent to pug.render - it takes a Pug template string and renders it to an HTML string. import(npm:pug) doesn't work in Val.Town due to Pug's usage of new Function , which is forbidden for security reasons, so this function uses Val.Town's eval API instead. Example const myEndpoint = async (req: express.Request, res: express.Response) => { const html = await @wilt.pug("p Hello #{name}!", {name: "Pug"}); res.status(200); res.send(html); }
kaleidawave avatar
ezno_check
@kaleidawave
Script
Check a snippet using Ezno. Example @kaleidawave.ezno_check( "const x: string = 20", );
feep avatar
nameNationality
@feep
Script
// Predict the nationality of a name
stevekrouse avatar
formDataEx
@stevekrouse
Script
// set by stevekrouse.form at 2023-08-28T20:38:45.006Z
tmcw avatar
pekoExample
@tmcw
HTTP (deprecated)
peko This is an example of using the tiny peko example with Val Town - it's a small router that lets you build web apps using the standard Request & Response objects. Peko just provides routing - matching URLs with functions - and lets you create your own Response object. Server examples Hono Peko Itty Router Nhttp
tmcw avatar
urlQueryStringExample
@tmcw
HTTP (deprecated)
This example shows how to get the query parameters out of a request with the Web API. Check out the searchParams object for more ways to handle query parameters.
mgruel avatar
objectMap
@mgruel
Script
Forked from stevekrouse/objectMap
taras avatar
blob_admin
@taras
HTTP (deprecated)
Forked from stevekrouse/blob_admin
rayyan avatar
blob
@rayyan
Script
Forked from janpaul123/blob
rym avatar
home
@rym
Script
// Access via https://api.val.town/v1/express/rym.home