grpcoin

module
v0.0.0-...-43b2f59 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Sep 7, 2021 License: Apache-2.0

README

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.

How to play on gRPCOIN?

Visit the https://grpco.in/ website to learn more about how to join the game.

What is on this repository?

This repository contains the server implementations and the API for the platform.

How to implement a bot?

To learn gRPC and Protocol Buffers, you should learn the API, generate the code from the proto file, and write your own bot on top.

Just to get started, you can also check out some example bot implementations:

  1. Go example bot
  2. C# example bot
  3. Node.js command-line tool
  4. Python example bot

Develop gRPCOIN API/Frontend Servers

To run the servers locally, follow these steps:

  1. Clone the repository and cd into it.

  2. Install Google Cloud SDK (gcloud tool) https://cloud.google.com/sdk/docs/quickstart

  3. Install Firestore Emulator to run database locally (this may require you to install Java Runtime Environment).

    gcloud components install cloud-firestore-emulator
    
  4. Make sure the emulator works by running it once:

    gcloud beta emulators firestore start
    
  5. 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.

Directories

Path Synopsis
api
firestoreutil
Package firestoreutil contains test utilities for starting a firestore emulator locally.
Package firestoreutil contains test utilities for starting a firestore emulator locally.
cmd
Package tradecounters is a library for counting trade events happening on the platform.
Package tradecounters is a library for counting trade events happening on the platform.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL