Skip to content

Hxro-Network/trades-webhook-start

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

6 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

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();

About

No description, website, or topics provided.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • Python 99.7%
  • Procfile 0.3%