This repository explores Vega Protocol as part of the Gitcoin GR11 Hackathon.
Vega Protocol is a decentralized platform for trading derivatives.
This project creates applications and associated documentation to guide a new user in using the Vega Protocol with GraphQL. The submission includes:
- A Vega Protocol GraphQL Walkthrough Application
- A Vega Protocol GraphQL in ReactJS Tutorial and an online demo of the ReactJS Starter Application
- A Documentation Book explaining the tutorial applications
This document is the how and why for creating the guides. The documentation for the guides themselves can be found in the Vega GraphQL Guides.
Detailed requirements are given in the Gitcoin Bounty. Important requirements used in this application are summarised here:
- Design and create a great showcase or walk-through application
- Bonus points for a set of supporting markdown files that describe how the application works, primarily the queries made to Vega
- The GraphQL playground should be referenced and described in the guides
- Code examples should link directly to an appropriate section in the reference docs (https://docs.testnet.vega.xyz/api/graphql/)
Essential Vega features to implement:
- Listing markets and market data (including market status)
- Streaming of orders and trades
- Party (trader) information for a given public key, including account balances and positions.
- Prepare and place an order on a market
- Streaming of events
- Governance proposals
Reads against the Vega apis do not require authentication. Writes / Updates must be signed using the Vega Wallet.
There is an official guide for setting up a Vega Wallet.
These guides extend the official Vega Documentation. Key to this is the API Documentation which provides how to guides focussing on gRPC and Rest APIs.
At the time of the hackathon, the network is running on testnet and there is a web based playground app.
A handy tool for exploring the GraphQL API is the Vega GraphQL Playground
The GraphQL guides are created for the GraphQL Reference Applications bounties of the GR11 Hackathon