santiment / sanpy

Santiment API Python Client
MIT License
96 stars 29 forks source link

Screener call #141

Closed phisanti closed 2 years ago

phisanti commented 2 years ago

I was wondering if there is any function, even if it is ray graphQL, to call the screener that we can use through the web interface.

IvanIvanoff commented 2 years ago

Hi @phisanti,

The library's intended use is to call the metrics, so for the rest of the functionality, there is no function implemented. But if you know the GraphQL request you want to execute you can do the following, as described here:

from san.graphql import execute_gql
metrics = execute_gql("""
{
  watchlist(id: 5296) {
    listItems {
      project {
        id
        name
        slug
        ticker
      }
    }
  }
}
""")