Readme

Runs daily to collect your Manifold loan!

Instructions:

  1. Fork this Val.
  2. Get your Manifold API key from your profile.
  3. Add manifoldApiKey with your key to the Val Environment Variables.
  4. Hit run! It will run daily to collect your loans.
Runs every 1 days
1
2
3
4
5
6
7
8
9
10
11
12
13
14
export default async function() {
const res = await fetch("https://api.manifold.markets/request-loan", {
headers: {
Authorization: `Key ${Deno.env.get("manifoldApiKey")}`,
},
});
if (!res.ok) {
const body = await res.text();
return new Error(body ?? "Error requesting loan");
}
return res.json();
}
Val Town is a social website to write and deploy JavaScript.
Build APIs and schedule functions from your browser.
Comments
Nobody has commented on this val yet: be the first!
March 9, 2024