gRPCoin: Programmatic paper trading platform using gRPC and Protobuf
This is an educational project that allows you to trade cryptocurrencies competitively by writing a bot on top of a gRPC-based API with real-time prices.
Using the gRPCoin API, you can write a bot and start trading using 100,000$ cash assigned to your account when you sign up.
Get started
-
Create a GitHub personal access token. You don't need to give any permissions.
-
Learn about API types and trading/portfolio endpoints in grpcoin.proto.
-
Choose a programming language, and compile the
.proto
file (learn how) or you can fork an example bot implementation. -
Implement a bot! To authenticate to the API, you need to add an
authorization
header (called "metadata" in gRPC) to your requests, e.g.authorization: Bearer MY_TOKEN
-
Endpoints you can use:
- API PROD endpoint
api.grpco.in:443
(TLS)- Rate limits:
- 100 per minute for authenticated calls.
- 50 per minute for unauthenticated calls.
- Rate limits:
- Website: https://grpco.in/
- API PROD endpoint
-
First time you make an authenticated request, your account will be created with $100,000 cash to start buying coins.
-
Start tracking your progress on the leaderboard.
Example bot implementations
To learn gRPC and Protocol Buffers, you should learn the API, generate the code from the proto, and write your own bot.
Just to get started, you can also check out some example bot implementations:
Development
To run the server locally, follow these steps:
-
Clone the repository and
cd
into it. -
Install Google Cloud SDK (
gcloud
tool) https://cloud.google.com/sdk/docs/quickstart -
Install Firestore Emulator to run database locally (this may require you to install Java Runtime Environment).
gcloud components install cloud-firestore-emulator
-
Make sure the emulator works by running it once:
gcloud beta emulators firestore start
-
From repository root, run:
LISTEN_ADDR=localhost PORT=8080 go run ./apiserver
to start the gRPC API server, or run
LISTEN_ADDR=localhost PORT=8080 go run ./frontend
to start the web frontend and navigate to http://localhost:8080 to explore.