Oasis Dex

Overview - REST API - Query API

Query API

GraphQL is a query language for APIs and a runtime for fulfilling those queries. It provides a complete and understandable description of the available data, and gives clients the power to ask for exactly what they need and nothing more.

Try out the api in the interactive console.

Tip: use the _underscore to trigger a list of available fields for autocompleting queries.



Usage

If you’re new to GraphQL you might want to start here.

Interact programatically via the HTTP endpoint: data.makerdao.com/v1

$ curl -XPOST  \
       -H "Content-Type:application/graphql" \
       -d 'query { allOasisTrades { totalCount } }' \
       https://data.makerdao.com/v1

  {
    "data": {
      "allOasisTrades": {
        "totalCount":23756
      }
    }
  }
Client Libraries

For simple requests over http you might want to check out GraphQL Request.

We also like the React-friendly Apollo Client.

And the Relay library.

And many more here.

Schema

Use the left submenu to browse the schema. Detailed docs can be found here.