forked from thrasher-corp/gocryptotrader
-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Basic documentation update for engine branch (thrasher-corp#369)
* Add basic docs for gRPC/gctcli/unified API and a few markdown fixes * Update patherinos and spacing fixes * Consistent namerinos * Fix spelling mistakes * Add fancy headers * Uperaterinos * Fix feedback nitterinos
- Loading branch information
Showing
9 changed files
with
313 additions
and
47 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,38 @@ | ||
# GoCryptoTrader gRPC client | ||
|
||
<img src="https://github.com/thrasher-corp/gocryptotrader/blob/master/web/src/assets/page-logo.png?raw=true" width="350px" height="350px" hspace="70"> | ||
|
||
[![Build Status](https://travis-ci.com/thrasher-corp/gocryptotrader.svg?branch=master)](https://travis-ci.com/thrasher-corp/gocryptotrader) | ||
[![Software License](https://img.shields.io/badge/License-MIT-orange.svg?style=flat-square)](https://github.com/thrasher-corp/gocryptotrader/blob/master/LICENSE) | ||
[![GoDoc](https://godoc.org/github.com/thrasher-corp/gocryptotrader?status.svg)](https://godoc.org/github.com/thrasher-corp/gocryptotrader) | ||
[![Coverage Status](http://codecov.io/github/thrasher-corp/gocryptotrader/coverage.svg?branch=master)](http://codecov.io/github/thrasher-corp/gocryptotrader?branch=master) | ||
[![Go Report Card](https://goreportcard.com/badge/github.com/thrasher-corp/gocryptotrader)](https://goreportcard.com/report/github.com/thrasher-corp/gocryptotrader) | ||
|
||
A cryptocurrency trading bot supporting multiple exchanges written in Golang. | ||
|
||
**Please note that this bot is under development and is not ready for production!** | ||
|
||
## Community | ||
|
||
Join our slack to discuss all things related to GoCryptoTrader! [GoCryptoTrader Slack](https://join.slack.com/t/gocryptotrader/shared_invite/enQtNTQ5NDAxMjA2Mjc5LTc5ZDE1ZTNiOGM3ZGMyMmY1NTAxYWZhODE0MWM5N2JlZDk1NDU0YTViYzk4NTk3OTRiMDQzNGQ1YTc4YmRlMTk) | ||
|
||
## Background | ||
|
||
GoCryptoTrader utilises gRPC for client/server interaction. Authentication is done | ||
by a self signed TLS cert, which only supports connections from localhost and also | ||
through basic authorisation specified by the users config file. | ||
|
||
## Usage | ||
|
||
GoCryptoTrader must be running with gRPC enabled in order to use the client features. | ||
|
||
```bash | ||
go build or go run . | ||
``` | ||
|
||
For a full list of commands, you can run `gctcli --help`. Alternatively, you can also | ||
visit our [GoCryptoTrader API reference.](https://api.gocryptotrader.app/) | ||
|
||
## Autocomplete | ||
|
||
Bash/ZSH autocomplete entries can be found [here](/contrib). |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,72 @@ | ||
# GoCryptoTrader Unified API | ||
|
||
<img src="https://github.com/thrasher-corp/gocryptotrader/blob/master/web/src/assets/page-logo.png?raw=true" width="350px" height="350px" hspace="70"> | ||
|
||
[![Build Status](https://travis-ci.com/thrasher-corp/gocryptotrader.svg?branch=master)](https://travis-ci.com/thrasher-corp/gocryptotrader) | ||
[![Software License](https://img.shields.io/badge/License-MIT-orange.svg?style=flat-square)](https://github.com/thrasher-corp/gocryptotrader/blob/master/LICENSE) | ||
[![GoDoc](https://godoc.org/github.com/thrasher-corp/gocryptotrader?status.svg)](https://godoc.org/github.com/thrasher-corp/gocryptotrader) | ||
[![Coverage Status](http://codecov.io/github/thrasher-corp/gocryptotrader/coverage.svg?branch=master)](http://codecov.io/github/thrasher-corp/gocryptotrader?branch=master) | ||
[![Go Report Card](https://goreportcard.com/badge/github.com/thrasher-corp/gocryptotrader)](https://goreportcard.com/report/github.com/thrasher-corp/gocryptotrader) | ||
|
||
A cryptocurrency trading bot supporting multiple exchanges written in Golang. | ||
|
||
**Please note that this bot is under development and is not ready for production!** | ||
|
||
## Community | ||
|
||
Join our slack to discuss all things related to GoCryptoTrader! [GoCryptoTrader Slack](https://join.slack.com/t/gocryptotrader/shared_invite/enQtNTQ5NDAxMjA2Mjc5LTc5ZDE1ZTNiOGM3ZGMyMmY1NTAxYWZhODE0MWM5N2JlZDk1NDU0YTViYzk4NTk3OTRiMDQzNGQ1YTc4YmRlMTk) | ||
|
||
## Unified API | ||
|
||
GoCryptoTrader supports a unified API for dealing with exchanges. Each exchange | ||
has its own wrapper file which maps the exchanges own RESTful endpoints into a | ||
standardised way for bot and standalone application usage. | ||
|
||
A full breakdown of all the supported wrapper funcs can be found [here.](https://github.com/thrasher-corp/gocryptotrader/blob/engine/exchanges/interfaces.go#L16) | ||
Please note that these change on a regular basis as GoCryptoTrader is undergoing | ||
rapid development. | ||
|
||
Each exchange supports public API endpoints which don't require any authentication | ||
(fetching ticker, orderbook, trade data) and also private API endpoints (which | ||
require authentication). Some examples include submitting, cancelling and fetching | ||
open orders). To use the authenticated API endpoints, you'll need to set your API | ||
credentials in either the `config.json` file or when you initialise an exchange in | ||
your application, and also have the appropriate key permissions set for the exchange. | ||
Each exchange has a credentials validator which ensures that the API credentials | ||
supplied meet the requirements to make an authenticated request. | ||
|
||
## Public API Ticker Example | ||
|
||
```go | ||
var b bitstamp.Bitstamp | ||
b.SetDefaults() | ||
ticker, err := b.FetchTicker(currency.NewPair(currency.BTC, currency.USD), asset.Spot) | ||
if err != nil { | ||
// Handle error | ||
} | ||
fmt.Println(ticker.Last) | ||
``` | ||
|
||
## Private API Submit Order Example | ||
|
||
```go | ||
var b bitstamp.Bitstamp | ||
b.SetDefaults() | ||
|
||
b.API.Credentials.Key = "your_key" | ||
b.API.Credentials.Secret = "your_secret" | ||
b.API.Credentials.ClientID = "your_clientid" | ||
|
||
order := &exchange.OrderSubmission{ | ||
Pair: currency.NewPair(currency.BTC, currency.USD), | ||
OrderSide: exchange.SellOrderSide, | ||
OrderType: exchange.LimitOrderType, | ||
Price: 1000000, | ||
Amount: 0.1, | ||
} | ||
resp, err := b.SubmitOrder(order) | ||
if err != nil { | ||
// Handle error | ||
} | ||
fmt.Println(resp.OrderID) | ||
``` |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,48 @@ | ||
# GoCryptoTrader File Hierarchy | ||
|
||
<img src="https://github.com/thrasher-corp/gocryptotrader/blob/master/web/src/assets/page-logo.png?raw=true" width="350px" height="350px" hspace="70"> | ||
|
||
[![Build Status](https://travis-ci.com/thrasher-corp/gocryptotrader.svg?branch=master)](https://travis-ci.com/thrasher-corp/gocryptotrader) | ||
[![Software License](https://img.shields.io/badge/License-MIT-orange.svg?style=flat-square)](https://github.com/thrasher-corp/gocryptotrader/blob/master/LICENSE) | ||
[![GoDoc](https://godoc.org/github.com/thrasher-corp/gocryptotrader?status.svg)](https://godoc.org/github.com/thrasher-corp/gocryptotrader) | ||
[![Coverage Status](http://codecov.io/github/thrasher-corp/gocryptotrader/coverage.svg?branch=master)](http://codecov.io/github/thrasher-corp/gocryptotrader?branch=master) | ||
[![Go Report Card](https://goreportcard.com/badge/github.com/thrasher-corp/gocryptotrader)](https://goreportcard.com/report/github.com/thrasher-corp/gocryptotrader) | ||
|
||
A cryptocurrency trading bot supporting multiple exchanges written in Golang. | ||
|
||
**Please note that this bot is under development and is not ready for production!** | ||
|
||
## Community | ||
|
||
Join our slack to discuss all things related to GoCryptoTrader! [GoCryptoTrader Slack](https://join.slack.com/t/gocryptotrader/shared_invite/enQtNTQ5NDAxMjA2Mjc5LTc5ZDE1ZTNiOGM3ZGMyMmY1NTAxYWZhODE0MWM5N2JlZDk1NDU0YTViYzk4NTk3OTRiMDQzNGQ1YTc4YmRlMTk) | ||
|
||
## Default data directory | ||
|
||
By default, GoCryptoTrader uses the following data directores: | ||
|
||
Operating System | Path | Translated | ||
--- | --- | ---- | ||
| Windows | %APPDATA%\GoCryptoTrader | C:\Users\User\AppData\Roaming\GoCryptoTrader | ||
| Linux | ~/.gocryptotrader | /home/user/.gocryptotrader | ||
| macOS | ~/.gocryptotrader | /Users/User/.gocryptotrader | ||
|
||
This can be overridden by running GoCryptoTrader with the `-datadir` command line | ||
parameter. | ||
|
||
## Subdirectories | ||
|
||
Depending on the features enabled, you'll see the following directories created | ||
inside the data directory: | ||
|
||
Directory | Reason | ||
--- | --- | ||
| database | Used to store the database file (if using SQLite3) and sqlboiler config files | ||
| logs | Used to store the debug log file (`log.txt` by default), if file output and logging is enabled | ||
| tls | Used to store the generated self-signed certificate and key for gRPC authentication | ||
|
||
## Files | ||
|
||
File | Reason | ||
--- | --- | ||
config.json or config.dat (encrypted config) | Config file which GoCryptoTrader loads from (can be overridden by the `-config` command line parameter). | ||
currency.json | Cached list of fiat and digital currencies |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,31 @@ | ||
# GoCryptoTrader Documentation | ||
|
||
<img src="https://github.com/thrasher-corp/gocryptotrader/blob/master/web/src/assets/page-logo.png?raw=true" width="350px" height="350px" hspace="70"> | ||
|
||
[![Build Status](https://travis-ci.com/thrasher-corp/gocryptotrader.svg?branch=master)](https://travis-ci.com/thrasher-corp/gocryptotrader) | ||
[![Software License](https://img.shields.io/badge/License-MIT-orange.svg?style=flat-square)](https://github.com/thrasher-corp/gocryptotrader/blob/master/LICENSE) | ||
[![GoDoc](https://godoc.org/github.com/thrasher-corp/gocryptotrader?status.svg)](https://godoc.org/github.com/thrasher-corp/gocryptotrader) | ||
[![Coverage Status](http://codecov.io/github/thrasher-corp/gocryptotrader/coverage.svg?branch=master)](http://codecov.io/github/thrasher-corp/gocryptotrader?branch=master) | ||
[![Go Report Card](https://goreportcard.com/badge/github.com/thrasher-corp/gocryptotrader)](https://goreportcard.com/report/github.com/thrasher-corp/gocryptotrader) | ||
|
||
A cryptocurrency trading bot supporting multiple exchanges written in Golang. | ||
|
||
**Please note that this bot is under development and is not ready for production!** | ||
|
||
## Community | ||
|
||
Join our slack to discuss all things related to GoCryptoTrader! [GoCryptoTrader Slack](https://join.slack.com/t/gocryptotrader/shared_invite/enQtNTQ5NDAxMjA2Mjc5LTc5ZDE1ZTNiOGM3ZGMyMmY1NTAxYWZhODE0MWM5N2JlZDk1NDU0YTViYzk4NTk3OTRiMDQzNGQ1YTc4YmRlMTk) | ||
|
||
## Documentation | ||
|
||
See below for feature documentation: | ||
|
||
+ [Exchange unified API documentation](EXCHANGE_API.md) | ||
+ [File hierarchy documentation](FILES.md) | ||
+ [Config documentation](/config/README.md) | ||
+ [gRPC service documentation](/gctrpc/README.md) | ||
+ [gctcli documentation](/cmd/gctcli/README.md) | ||
+ [Database documentation](/database/README.md) | ||
+ [Currency documentation](/currency/README.md) | ||
+ [Exchange documentation](/exchanges/README.md) | ||
+ [Portfolio documentation](/portfolio/README.md) |
Oops, something went wrong.