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.
justy avatar
myApi
@justy
Script
An interactive, runnable TypeScript val by justy
mmrech avatar
anthropicProxy
@mmrech
Script
Forked from cephalization/anthropicProxy
stevekrouse avatar
key_safe_link
@stevekrouse
HTTP (deprecated)
One-click environment variable Copying and pasting secret API keys into your Val Town Environment Variables is annoying and error prone. Wouldn't it be nice if you could add an environment variable in one click? What could such a protocol look like for third-party API company to be able to safely pass their customer's API keys to their customer's Val Town account. A naive approach to this would be a link that looks like this: <a href="https://www.val.town/settings/environment-variables?name=OpenAI&value=sk-123..."> Add OpenAI key to Val Town </a> However it isn't safe to put API key values in URLs like that, but it would be great if we could still put it in the URL so it can act like a simple link. We need to encrypt the API key in such a way that nobody can read it except for the Val Town app. Val Town could provide a public key for API providers to encrypt their tokens with. We could add an extra layer of security by including the timestamp in the request as well as the Val Town username that the token is intended for. All that data should be included in the encrypted package. We can also ensure that each such link is used exactly once. This scheme does feel a bit ad hoc though, so it'd be nice if there existed another protocol for doing this that we could use.
stevekrouse avatar
nominatimSearch
@stevekrouse
Script
Geocode a free-form description via the Nominatim API The search API allows you to look up a location from a textual description or address. Nominatim supports structured and free-form search queries. Docs: https://nominatim.org/release-docs/latest/api/Search/
augustohp avatar
httpNull
@augustohp
Script
// For debugging/inspecting webhooks requests ...
astrat1 avatar
umbrellaReminder
@astrat1
Cron
Forked from ayush37/umbrellaReminder
janpaul123 avatar
valle_tmp_99498691417249546719413191646675
@janpaul123
HTTP (deprecated)
// This val responds with an HTML form styled with CSS to input the user's name and greets them upon form submission
pomdtr avatar
sapphireSeahorse
@pomdtr
HTTP (deprecated)
An interactive, runnable TypeScript val by pomdtr
andreterron avatar
form_handler
@andreterron
HTTP (deprecated)
Receive form responses Live demo: https://andreterron-form_demo.web.val.run/ Create a form that posts to your val: <form action="https://andreterron-form_handler.web.val.run" method="post"> <label for="username">Val Town username:</label> <input name="username" type="text"> <button type="submit">Submit</button> </form> And get your results stored as an array: // set by andreterron.form_handler at 2023-08-10T21:04:43.364Z let formResponses = [{ "username": "andreterron", }, { "username": "stevekrouse", }]; Usage Fork this val and click the šŸ”’ to set it as "Unlisted" Open the val menu ā†’ Endpoints ā†’ "Copy web endpoint" Use that url as the action attribute of your form Check out the example val: https://www.val.town/v/andreterron.form_demo Storage of form submissions This val saves to another val ( @me.formResponse ), which has a 100kb limitation (250kb for pro users), if you want to store them in a more scalable solution, check out our guides
tgrv avatar
weatherGPT
@tgrv
Cron
Forked from stevekrouse/weatherGPT
acmu avatar
myApiAdd
@acmu
Script
An interactive, runnable TypeScript val by acmu
stevekrouse avatar
http_client
@stevekrouse
HTTP (deprecated)
Forked from pomdtr/http_client
janpaul123 avatar
valle_tmp_205899010159034569576183049286815
@janpaul123
HTTP (deprecated)
// This val serves an HTML page with a form to enter your name.
hunty avatar
FetchBasic
@hunty
HTTP (deprecated)
Framer Fetch: Basic A basic example of an API endpoint to use with Framer Fetch.
stevekrouse avatar
getVal
@stevekrouse
Script
Forked from neverstew/getVal
janpaul123 avatar
valle_tmp_239473183576900634635727013442197
@janpaul123
HTTP (deprecated)
// This val responds with an HTML form for users to input their name and get a greeting