Skip to content

Latest commit

 

History

History
35 lines (32 loc) · 1.27 KB

README.md

File metadata and controls

35 lines (32 loc) · 1.27 KB

Dexterity Fills Webhook Server & API

A minimal Flask web application that serves as an endpoint that can be passed to a Helius Webhook instance to handle transactions streamed in for the Dexterity Program ID, proccess them, filter for OrderFillEvents, parse and insert them into a PostgresSQL Table

Deploy on Railway

(Check out db.py for how to build your fills table)

Helius Webhook

const createWebhook = async () => {
    try {
      const response = await fetch(
        "https://api.helius.xyz/v0/webhooks?api-key=<PASTE YOUR API KEY HERE>",
        {
          method: 'POST',
          headers: {
            'Content-Type': 'application/json',
          },
          body: JSON.stringify({
            "webhookURL": "https://your-railway-deployment.app/webhooks",
            "accountAddresses": ["FUfpR31LmcP1VSbz5zDaM7nxnH55iBHkpwusgrnhaFjL"],
            "accountAddressOwners": [],
            "encoding": "jsonParsed",
            "webhookType": "raw"
       }),
        }
      );
      const data = await response.json();
      console.log({ data });
    } catch (e) {
      console.error("error", e);
    }
  };
  createWebhook();