Get started
Quickstart
Make a key, call the API and read your first coin.
1. Make a key
Open API keys, sign in with X, say what the key is for and press Request key. The key is shown once, so copy it. It works once Payday approves the request; until then calls answer 403 key_pending.
2. Call the API
Send the key in a header on every call. Everything answers JSON.
curl -H "Authorization: Bearer pd_YOUR_KEY" "https://payday.direct/api/v1/coins?status=graduated&limit=5"const res = await fetch("https://payday.direct/api/v1/coins?status=graduated&limit=5", {
headers: { Authorization: "Bearer " + process.env.PAYDAY_KEY },
});
const { data, next_cursor } = await res.json();
console.log(data.map((c) => c.symbol), next_cursor);import os, requests
r = requests.get("https://payday.direct/api/v1/coins", params={"status": "graduated", "limit": 5},
headers={"Authorization": "Bearer " + os.environ["PAYDAY_KEY"]})
r.raise_for_status()
print([c["symbol"] for c in r.json()["data"]])3. Read one coin and the account it pays
curl -H "X-API-Key: pd_YOUR_KEY" https://payday.direct/api/v1/coins/MINT_ADDRESS
curl -H "X-API-Key: pd_YOUR_KEY" https://payday.direct/api/v1/accounts/examplehandleNext
- Which coins are Payday's: follow the registry instead of polling
/coins. - Errors and rate limits: what to retry and when.
- Launch a coin: needs a key approved to launch coins.