Remove WEX exchange support

This commit is contained in:
Adrian Gallagher
2019-02-08 13:52:53 +11:00
parent 5e5ca8a887
commit 26d67f5228
15 changed files with 3 additions and 1825 deletions

View File

@@ -72,7 +72,6 @@ const (
okcoin = "..%s..%sexchanges%sokcoin%s"
okex = "..%s..%sexchanges%sokex%s"
poloniex = "..%s..%sexchanges%spoloniex%s"
wex = "..%s..%sexchanges%swex%s"
yobit = "..%s..%sexchanges%syobit%s"
zb = "..%s..%sexchanges%szb%s"
@@ -246,7 +245,6 @@ func addPaths() {
codebasePaths["exchanges okcoin"] = fmt.Sprintf(okcoin, path, path, path, path)
codebasePaths["exchanges okex"] = fmt.Sprintf(okex, path, path, path, path)
codebasePaths["exchanges poloniex"] = fmt.Sprintf(poloniex, path, path, path, path)
codebasePaths["exchanges wex"] = fmt.Sprintf(wex, path, path, path, path)
codebasePaths["exchanges yobit"] = fmt.Sprintf(yobit, path, path, path, path)
codebasePaths["exchanges zb"] = fmt.Sprintf(zb, path, path, path, path)

View File

@@ -1,98 +0,0 @@
{{define "exchanges wex" -}}
{{template "header" .}}
## Wex Exchange
### Current Features
+ REST Support
### How to enable
+ [Enable via configuration](https://github.com/thrasher-/gocryptotrader/tree/master/config#enable-exchange-via-config-example)
+ Individual package example below:
```go
// Exchanges will be abstracted out in further updates and examples will be
// supplied then
```
### How to do REST public/private calls
+ If enabled via "configuration".json file the exchange will be added to the
IBotExchange array in the ```go var bot Bot``` and you will only be able to use
the wrapper interface functions for accessing exchange data. View routines.go
for an example of integration usage with GoCryptoTrader. Rudimentary example
below:
main.go
```go
var w exchange.IBotExchange
for i := range bot.exchanges {
if bot.exchanges[i].GetName() == "Wex" {
y = bot.exchanges[i]
}
}
// Public calls - wrapper functions
// Fetches current ticker information
tick, err := w.GetTickerPrice()
if err != nil {
// Handle error
}
// Fetches current orderbook information
ob, err := w.GetOrderbookEx()
if err != nil {
// Handle error
}
// Private calls - wrapper functions - make sure your APIKEY and APISECRET are
// set and AuthenticatedAPISupport is set to true
// Fetches current account information
accountInfo, err := w.GetAccountInfo()
if err != nil {
// Handle error
}
```
+ If enabled via individually importing package, rudimentary example below:
```go
// Public calls
// Fetches current ticker information
ticker, err := w.GetTicker()
if err != nil {
// Handle error
}
// Fetches current orderbook information
ob, err := w.GetDepth()
if err != nil {
// Handle error
}
// Private calls - make sure your APIKEY and APISECRET are set and
// AuthenticatedAPISupport is set to true
// Fetches current account information
accountInfo, err := w.GetAccountInfo()
if err != nil {
// Handle error
}
// Submits an order and the exchange and returns its tradeID
tradeID, err := w.Trade("BTCUSD", "MARKET", 1, 2)
if err != nil {
// Handle error
}
```
### Please click GoDocs chevron above to view current GoDoc information for this package
{{template "contributions"}}
{{template "donations"}}
{{end}}

View File

@@ -46,7 +46,6 @@ Join our slack to discuss all things related to GoCryptoTrader! [GoCryptoTrader
| OKCoin International | Yes | Yes | No |
| OKEX | Yes | Yes | No |
| Poloniex | Yes | Yes | NA |
| WEX | Yes | NA | NA |
| Yobit | Yes | NA | NA |
| ZB.COM | Yes | Yes | NA |