The basic building block of the Codex API
Authorization
https://graph.codex.io/graphql
queries
Try it
SDK
import { Codex } from "@codex-data/sdk" const sdk = new Codex("your-api-key") const { getTokenPrices } = await sdk.query(gql` query { getTokenPrices(inputs: [{ address: "0xbb4cdb9cbd36b01bd1cbaebf2de08d9173bc095c", networkId: 56 }]) { priceUsd timestamp address } } `)
Custom
fetch("https://graph.codex.io/graphql", { method: "POST", headers: { "Authorization": apiKey, }, body: JSON.stringify({ query: 'query { getTokenPrices(inputs: [{ address: "0xbb4cdb9cbd36b01bd1cbaebf2de08d9173bc095c", networkId: 56 }]) { priceUsd timestamp address } }' }), })
Was this page helpful?