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.
rayman avatar
QuillEditor
@rayman
HTTP (deprecated)
Forked from saolsen/quil
ashryanio avatar
openAiProxy
@ashryanio
HTTP (deprecated)
openAiProxy Overview This val is a proxy server that interacts with the OpenAI API to generate responses based on prompts in the request body. The function handles incoming HTTP POST requests, processes the prompt, and returns a response generated by the LLM. Prerequisites Server-side: (Optional) An active OpenAI API key Client-side: Something that can make POST requests (browser code, Postman, cURL, another Val, etc) Usage Endpoint The primary endpoint for this function is designed to handle HTTP POST requests. Request Method : POST Content-Type : application/json Body : JSON object containing a prompt field (e.g. {"prompt": "Help me make a boat."} ) Example Request curl -X POST https://ashryanio-openaiproxy.web.val.run -H "Content-Type: application/json" -d '{"prompt": "Hello, OpenAI!"}' Response Content-Type : application/json Body : JSON object containing the response from the OpenAI language model. Example Response { "llmResponse": "Hi there! How can I assist you today?" } Error Handling 400 Bad Request : Returned if the prompt field is missing in the request body. 405 Method Not Allowed : Returned if any method other than POST or OPTIONS is used. 500 Internal Server Error : Returned if there is an error processing the request.
stevekrouse avatar
cookiesDemo
@stevekrouse
Script
An interactive, runnable TypeScript val by stevekrouse
gueejla avatar
helloworld
@gueejla
HTTP (deprecated)
Hello val town!
stevekrouse avatar
generic
@stevekrouse
Script
An interactive, runnable TypeScript val by stevekrouse
habosa avatar
umbrellaReminder
@habosa
Cron
Forked from stevekrouse/umbrellaReminder
vinspee avatar
createRelease
@vinspee
Script
An interactive, runnable TypeScript val by vinspee
sarfrazkhan18 avatar
umbrellaReminder
@sarfrazkhan18
Cron
Forked from stevekrouse/umbrellaReminder
pomdtr avatar
lastloginExample
@pomdtr
HTTP (deprecated)
An interactive, runnable TypeScript val by pomdtr
stevekrouse avatar
sqliteKV
@stevekrouse
Script
An interactive, runnable TypeScript val by stevekrouse
emarref avatar
HttpResponse
@emarref
Script
Factory functions for creating HTTP Response objects.
philz avatar
libsqlstudio
@philz
HTTP (deprecated)
Forked from pomdtr/libsqlstudio
hfu avatar
react_maplibre
@hfu
HTTP (deprecated)
Forked from yuiseki/untitled_amaranthSnake
stevekrouse avatar
nanoid
@stevekrouse
Script
Nano Id Function Usage @stevekrouse.nanoid() // Returns something like "MRRdswxjEph4sDiuEzlBM" Example: https://www.val.town/v/stevekrouse.exampleNanoId
horatiothomas avatar
dream_interpreter
@horatiothomas
Cron
interpret your dream
stevekrouse avatar
notionGetDatabaseEditedAfter
@stevekrouse
Script
An interactive, runnable TypeScript val by stevekrouse