The Graph exposes a GraphQL endpoint to query the events and entities within the Binance Smart Chain and PSI Dex ecosystem.
Currently, there are multiple subgraphs, but additional subgraphs can be added to this repo:
-
Blocks: Tracks all the blocks on Binance Smart Chain.
-
Exchange: Tracks all PSI Dex Exchange data with price, volume, liquidity, ...
-
DexCandles: Tracks all the PSI Dex trades (event:
Swap) with 5m / 15m / 1h / 4h / 1d / 1w candles.
Graph has issues with indexing the bsc chain, so currently our graph schemes are not working as they should: graphprotocol/graph-node#2517 https://status.thegraph.com
For any of the subgraph: blocks as [subgraph]
-
Run the
yarn run codegen:[subgraph]command to prepare the TypeScript sources for the GraphQL (generated/*). -
Run the
yarn run build:[subgraph]command to build the subgraph, and check compilation errors before deploying. -
Run
graph auth https://api.thegraph.com/deploy/ '<ACCESS_TOKEN>' -
Deploy via
yarn run deploy:[subgraph].