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.
dhvanil avatar
dhvanil
val_vzWqpVMPzR
HTTP
An interactive, runnable TypeScript val by dhvanil
0
tmcw avatar
tmcw
honoExample
HTTP
Hono Here's an example using the Hono server library with the Web API . It works great! Server examples Hono Peko Itty Router Nhttp
0
stevekrouse avatar
stevekrouse
myHandle
Script
An interactive, runnable TypeScript val by stevekrouse
0
heltonteixeira avatar
heltonteixeira
MultiEncryptionKeyGenerator
HTTP
@jsxImportSource https://esm.sh/react
0
xxsheddy avatar
xxsheddy
isMyWebsiteDown
Cron
Forked from andreterron/isMyWebsiteDown
0
AshishChaudhary10 avatar
AshishChaudhary10
YouTubeSearchApp
HTTP
YouTube all features
0
sumukh avatar
sumukh
uptime
Cron
Forked from stevekrouse/uptime
0
barelyhuman avatar
barelyhuman
tapMochaToNode
Script
tapMochaToNode A simple codemod to modify existing node tap v16 mocha style tests to node:test runner syntax. It still keeps the tap assertion utils but replaces everything else to use node's runner instead.
0
Saadaap avatar
Saadaap
gregariousCrimsonFlamingo
HTTP
2الخدمات عند النقرعليها تفتح صفحه مكونه من ناف بار فيه فورم للبحث و زر لتحديث الصفحه وزرللعوده للرئيسيه 1كبينة التسديدات 2كبينة ارسال سندالايداع 3كبينة الشرائح والتفعيل 4كبينةتحويل من شخص لشخص 5كبينة ادارة العملاء 6كبينة فواتيرالكهرباء 7كبينة تغذية حسابي 8كبينة اعدادات الحساب 9كبينة شحن برامج التواصل 10كبينة معرض الالعاب 1 1كبينة التواصل مع الاداره 12كبينة بنك البطائق
0
pomdtr avatar
pomdtr
blob_actions
Script
An interactive, runnable TypeScript val by pomdtr
0
pomdtr avatar
pomdtr
val2img
Script
This val is supposed to be used with the val.town extension. See the extension readme for installation instructions.
0
yawnxyz avatar
yawnxyz
honoAlpineExample
HTTP
// Endpoint to catch and log the submitted name
0
beneskildsen avatar
beneskildsen
initGrid
Script
An interactive, runnable TypeScript val by beneskildsen
0
tempguy avatar
tempguy
liteutils
Script
An interactive, runnable TypeScript val by tempguy
0
stevekrouse avatar
stevekrouse
emailEx
Script
An interactive, runnable TypeScript val by stevekrouse
0
karfau avatar
karfau
SignatureCheck
Script
This val has been created to avoid certain shortcomings of @vtdocs.verifyGithubWebhookSignature . So it was created as a mix/evolution of two sources: The github docs about securing webhook Some code from the @octokit/webhhokmethods package This code is covered by tests which you can copy to run them, see @karfau.test_SignatureCheck This val does not contain any val.town specific code ( @ -imports, console.email ...), so it should be possible to run in Deno as is, potentially even in modern browsers (that support crypto and TextEncoder and modern ES syntax). Usage const myGithubWebhook = (req: Request) => { const {verify} = @karfau.SignatureCheck(); // you have to call it to get the verify function! const body = await req.text(); const signature = req.headers.get("X-Hub-Signature-256"); const verified = await verify( {payload:body, signature}, @me.secrets.myGithubWebhookSecret, // optionally provide fallback secrets (as many as needed) // @me.secrets.myGithubWebhookSecretFallback ); if (!verified) { return new Response(`Not verified`, 401); } const payload = JSON.parse(body); // actually do things in your webhook }; By default the reason for failing verification is logged to console.error , but you can pass it a different handler: const {verify} = @karfau.SignatureCheck((reason) => { throw new Error(reason); }); (be aware that it will silently fail if you don't try catch it in an endpoint and the return code will be 502) Why @vtdocs.verifyGithubWebhookSignature has the following issues: it relies on the verify method of the outdated @octokit/webhooks-methods@3.0.2 which has (at least) two bugs that can make a difference when used in a webhook it can throws errors instead of just returning false , which can be triggered by sending an invalid signature it can be lured into checking a SHA1 signature if the signature header starts with sha1= you need to pass the secret and payload as argument to the val, which makes them appear in the evaluation logs you produce ( they are only visible for the author of the val if you run them as an API , but it still feels odd to see the secret in the evaluation logs.) parameters are all of type string and the order can be confused you can not use fallback secrets for rotating
2