Skip to content

HilliamT/nftmeow-backend

 
 

Repository files navigation

NFT Meow API

This project contains the backend for NFT Meow. NFT data is aggregated using Apibara Server and the Python SDK.

The code in this repository is deployed at the following address:

https://nftmeow-api.apibara.com/

You can visit the link to interact with the GraphQL API.

Pagination

The GraphQL API follows the Relay Specification for pagination.

Example Queries

List collections

{
  collections {
    edges {
      node {
        name
        address
      }
    }
  }
}

List tokens owned by a user

{
  tokens(owner: { eq: "0x05ee617dd6946474dd834105c0f986ce8fdd50112851f579cb2e0deed59b876d" }) {
    edges {
      node {
        tokenId
        collection {
          name
        }
        owners
      }
    }
  }
}

List tokens in a collection

{
  tokens(collection: { eq: "0x0270624780e89ff3ebee0e27409b5577a7916e135f792abcbf9ddc66fbf67b26" }) {
    edges {
      node {
        tokenId
        collection {
          address
          name
        }
        owners
      }
    }
  }
}

List most recent mints

{
  transfers(first: 10, fromAddress: { eq: "0x0" }) {
    edges {
      node {
        fromAddress
        toAddress
        time
        token {
          tokenId
          collection {
            name
          }
        }
      }
    }
  }
}

Getting Started

Start by installing docker-compose and using it to run MongoDB and Apibara Server.

  • docker-compose up

Then install Poetry and the Python dependencies needed by this project.

  • poetry install

Finally, run the indexer.

  • nftmeow indexer

About

NFT Meow backend, powered by Apibara

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • Python 99.1%
  • Dockerfile 0.9%