https://github.com/cwntr/go-dex-client
Client for Stakenet XSN Decentralized Exchange (DEX) API written in golang.
https://github.com/cwntr/go-dex-client
cryptocurrency decentralized dex go golang grpc lightning-network trading-bot
Last synced: 2 months ago
JSON representation
Client for Stakenet XSN Decentralized Exchange (DEX) API written in golang.
- Host: GitHub
- URL: https://github.com/cwntr/go-dex-client
- Owner: cwntr
- License: mit
- Created: 2020-04-11T09:18:00.000Z (almost 6 years ago)
- Default Branch: master
- Last Pushed: 2020-11-09T21:21:36.000Z (over 5 years ago)
- Last Synced: 2026-01-12T00:24:40.348Z (3 months ago)
- Topics: cryptocurrency, decentralized, dex, go, golang, grpc, lightning-network, trading-bot
- Language: Go
- Homepage: http://orderbook.stakenet.io
- Size: 735 KB
- Stars: 4
- Watchers: 2
- Forks: 3
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# go-dex-client
[](https://raw.githubusercontent.com/miguelmota/cwntr/go-crypto-tools/LICENSE.md)
[](https://www.codacy.com/manual/cwntr/go-dex-client?utm_source=github.com&utm_medium=referral&utm_content=cwntr/go-dex-client&utm_campaign=Badge_Grade)
[](#contributing)
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**](https://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.
## Components

In order to setup all mandatory components on your VM, have a look [infrastructure.md](infrastructure/infrastructure.md) which is a step by step installation guide.
## Run the client
Once the mandatory components are installed, you can head over to [DexAPI Client installation.md](infrastructure/bot.md) and get the client running. It has basic functionality to list, place and cancel orders.
## Create stub via protoc (if not up-to-date)
Use the following link to install the prerequisites ([**https://grpc.io/docs/quickstart/go/**](https://grpc.io/docs/quickstart/go/)):
1. install `protoc compiler` (3.6.1+)
2. install `protoc-gen-go` compiler plugin
### Generate a stub by using the lssdrpc.proto file
The latest **lssdrpc.proto** file can be found on:
[**github.com/X9Developers/DexAPI/releases**](https://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:
1. `cd lssdrpc/`
2. `protoc -I . lssdrpc.proto --go_out=plugins=grpc:.`
which will output a **lssdrpc.rb.go** that has client and server connectors automatically generated.