Documentation

GraphQL Queries

Query the Ponder indexer with GraphQL

Endpoint

http://localhost:42069/graphql

Example Queries

Get User Deposits

query GetDeposits($user: String!) {
  deposits(where: { depositor: $user }) {
    items {
      id
      token
      initialAmount
      remainingAmount
      released
    }
  }
}

Get Pending Actions

query GetPendingActions {
  actions(where: { status: "pending" }) {
    items {
      id
      depositId
      user
      actionType
      createdAt
    }
  }
}

Get User Position

query GetPosition($user: String!) {
  position(id: $user) {
    collateral
    debt
    lastUpdated
  }
}

Related