A client implementation for Stakenet's XSN DexAPI (Decentralized Exchange) written in golang.
The official XSN DexAPI with a trading bot example written in Scala can be found here: github.com/X9Developers/DexAPI. It also has an extensive documentation how to set up all the required components on your machine which is mandatory to get this bot running, since this repository only provides an alternative DexAPI Client implementation.
In order to setup all mandatory components on your VM, have a look infrastructure.md which is a step by step installation guide.
Once the mandatory components are installed, you can head over to DexAPI Client installation.md and get the client running. It has basic functionality to list, place and cancel orders.
Use the following link to install the prerequisites (https://grpc.io/docs/quickstart/go/):
- install
protoc compiler
(3.6.1+) - install
protoc-gen-go
compiler plugin
The latest lssdrpc.proto file can be found on: github.com/X9Developers/DexAPI/releases
This lssdrpc.proto has to be copied to the lssdrpc
directory and the following commands have to be executed.
Go to the project root, execute the following command to generate a go client for the lssdrpc API:
cd lssdrpc/
protoc -I . lssdrpc.proto --go_out=plugins=grpc:.
which will output a lssdrpc.rb.go that has client and server connectors automatically generated.