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.
tmcw avatar
tmcw
pekoExample
HTTP
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
0
rozek avatar
rozek
GDI_URLParserService
HTTP
Forked from rozek/GDI_ServerTimeService
0
mgruel avatar
mgruel
objectMap
Script
Forked from stevekrouse/objectMap
0
tmcw avatar
tmcw
urlQueryStringExample
HTTP
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.
0
rororowyourboat avatar
rororowyourboat
returnFortyTwo
HTTP
An interactive, runnable TypeScript val by rororowyourboat
0
sjerred avatar
sjerred
renderFormAndSaveData
HTTP
Forked from andreterron/renderFormAndSaveData
0
rym avatar
rym
home
Script
// Access via https://api.val.town/v1/express/rym.home
1
nbbaier avatar
nbbaier
mdConvert
HTTP
mdConvert Inspired by markdown.rest . Converts markdown (plain text or base64 encoded) to HTML (plain text or base64 encoded)
0
pomdtr avatar
pomdtr
orangeMite
HTTP
https://pomdtr-orangemite.web.val.run
0
charmaine avatar
charmaine
emailValHandler
Email
Forked from simplescraper/aiEmailAssistant
0
stevekrouse avatar
stevekrouse
myApi
Script
An interactive, runnable TypeScript val by stevekrouse
0
flesch avatar
flesch
altairClient
HTTP
Altair GraphQL Client import { altairClient } from "https://esm.town/v/flesch/altairClient"; import { graphql, GraphQLObjectType, GraphQLSchema, GraphQLString } from "https://esm.sh/graphql"; // Define the GraphQL schema const schema = new GraphQLSchema({ query: new GraphQLObjectType({ name: "Query", fields: { hello: { type: GraphQLString, resolve: () => "Hello from Val Town GraphQL API!", }, }, }), }); // Function to handle GraphQL requests async function handleGraphQLRequest(request: Request): Promise<Response> { const { query, variables } = await request.json(); const result = await graphql({ schema, source: query, variableValues: variables, }); return new Response(JSON.stringify(result), { headers: { "Content-Type": "application/json" }, }); } // HTTP handler function export default altairClient(async function(req: Request): Promise<Response> { if (req.method === "POST") { return handleGraphQLRequest(req); } else { return new Response("This endpoint only accepts POST requests for GraphQL queries.", { status: 405 }); } }); ↑ https://www.val.town/v/flesch/graphqlAPIEndpoint
1
dotim avatar
dotim
ntfy
Script
An interactive, runnable TypeScript val by dotim
0
stevekrouse avatar
stevekrouse
awaitAll
Script
Recursively await a value Example useage: @stevekrouse.awaitAll(Promise.resolve({ a: Promise.resolve([Promise.resolve(1)]), })); Returns: { "a": [ 1 ] }
0
stevekrouse avatar
stevekrouse
formOld
Script
// Forked from @andreterron.valtown_forms_test
0
vgrichina avatar
vgrichina
password_manager_demo
HTTP
An interactive, runnable TypeScript val by vgrichina
0