Public
HTTP (deprecated)
Val Town is a social website to write and deploy JavaScript.
Build APIs and schedule functions from your browser.
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
import { getJupiterPerpsPnLForWallet } from "https://esm.town/v/rwev/getJupiterPerpsPnLForWallet";
import { parseUrlParam } from "https://esm.town/v/rwev/parseUrlParam";
import { rowsToTable } from "https://esm.town/v/rwev/rowsToTable";
import { email } from "https://esm.town/v/std/email";
// const wallet = Deno.env.get("CRYPTO_ADDR_SOL");
// const rows = await getJupiterPerpsPnLForWallet(wallet);
export async function handleJupPerpsRequest(req: Request) {
const wallet = parseUrlParam(req, "w");
console.log(wallet);
return Response.json(
await getJupiterPerpsPnLForWallet(wallet),
);
}
rwev-jupiterperpetuals.web.val.run
March 25, 2024