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.
adagradschool avatar
adagradschool
softTanSlug
HTTP
An interactive, runnable TypeScript val by adagradschool
0
vez avatar
vez
getVal
Script
// Forked from @nate.getVal
0
fshine99 avatar
fshine99
bookReservationOnResy
Script
Forked from alp/bookReservationOnResy
0
sieteunoseis avatar
sieteunoseis
dailyDadJoke
HTTP
Forked from stevekrouse/dailyDadJoke
0
dthyresson avatar
dthyresson
bedtimeStoryAnimals
Script
An interactive, runnable TypeScript val by dthyresson
0
sheepish avatar
sheepish
industriousEmeraldWhippet
Cron
// Fetches a random joke.
0
arfan avatar
arfan
ios_test
HTTP
@jsxImportSource https://esm.sh/react@18.2.0
0
DannieP avatar
DannieP
BeMyValentines
HTTP
Forked from DannieP/valentine
0
ireneg avatar
ireneg
cheerfulCyanBarnacle
Script
Forked from alp/bookReservationOnResy
0
pomdtr avatar
pomdtr
react_example
HTTP
* @title Running React on the Client * @description Vals can also be used to host client-side code! * @preview https://pomdtr-react_example_server.web.val.run * @include pomdtr/react_example_client * @resource [React - Quick Start](https://react.dev/learn)
1
xkonti avatar
xkonti
gptApiFramework
Script
Allows for automatic generation of Hono API compatible with GPTs. Endpoints' inputs and outputs need to be specified via types from which the Open API spec is generated automatically and available via /gpt/schema endpoint. ⚠️ Breaking changes introduced in v23 & 24: nothingToJson doesn't take the generic TResponse anymore. The type is inferred from the endpoint definition. The endpoint definition doesn't need the requestSchema , requestDesc and responseDesc defined anymore. The descriptions are inferred from the schema description. jsonToJson doesn't take the generic TRequest and TResponse anymore. Types are inferred from the endpoint definition. The endpoint definition doesn't need the requestDesc and responseDesc defined anymore. The descriptions are inferred from the schema description. Usage example: import { GptApi } from "https://esm.town/v/xkonti/gptApiFramework"; import { z } from "npm:zod"; /** * COMMON TYPES */ const ResponseCommandSchema = z.object({ feedback: z.string().describe("Feedback regarding submitted action"), command: z.string().describe("The command for the Mediator AI to follow strictly"), data: z.string().optional().describe("Additional data related to the given command"), }).describe("Contains feedback and further instructions to follow"); /** * INITIALIZE API */ const api = new GptApi({ url: "https://xkonti-planoverseerai.web.val.run", title: "Overseer AI API", description: "The API for interacting with the Overseer AI", version: "1.0.0", policyGetter: async () => { const { markdownToPrettyPage } = await import("https://esm.town/v/xkonti/markdownToHtmlPage?v=5"); return await markdownToPrettyPage("# Privacy Policy\n\n## Section 1..."); }, }); /** * REQUIREMENTS GATHERING ENDPOINTS */ api.nothingToJson({ verb: "POST", path: "/newproblem", operationId: "new-problem", desc: "Endpoint for informing Overseer AI about a new problem presented by the User", responseSchema: ResponseCommandSchema, responseDesc: "Instruction on how to proceed with the new problem", }, async (ctx) => { return { feedback: "User input downloaded. Problem analysis is required.", command: await getPrompt("analyze-problem"), data: "", }; }); export default api.serve();
2
liamdanielduffy avatar
liamdanielduffy
getValAsString
Script
// This is useful if you want to keep the intellisense on a val,
0
radu avatar
radu
basicAPIEx
Script
An interactive, runnable TypeScript val by radu
0
tempdev avatar
tempdev
distinctGoldLark
Script
Forked from tempguy/distinctGoldLark
0
chet avatar
chet
cleanHtml
Script
An interactive, runnable TypeScript val by chet
0
varshu25 avatar
varshu25
readyTurquoiseTarsier
HTTP
Forked from varshu25/valentine
0