Skip to content

Commit

Permalink
feat(tradebot): add tradebot
Browse files Browse the repository at this point in the history
  • Loading branch information
Akagi201 committed Nov 23, 2017
1 parent cff81fd commit bdba43b
Show file tree
Hide file tree
Showing 25 changed files with 208 additions and 1,134 deletions.
35 changes: 23 additions & 12 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,23 +3,36 @@
A cryptocurrency trader for all famous exchanges.

## Supported Exchanges
- [x] CHBTC
- [x] yunbi
- [x] viabtc

### Exchange move
* btc9 -> cex
* chbtc -> exx, zb
* btc38 -> aex
* jubi -> coinegg
* etcwin -> btc018
* lhang -> lbank

### Deprecated
- [x] ~~yunbi~~
- [x] ~~viabtc~~

### China
- [x] okcoin
- [x] huobi
- [x] binance
- [x] btc9
- [x] okcoin
- [x] zb
- [x] allcoin
- [x] cex
- [ ] exx
- [ ] kucoin

### Others
- [x] bittrex
- [x] liqui
- [x] poloniex
- [x] lhang
- [x] jubi
- [x] allcoin
- [x] bitfinex
- [x] coincheck
- [x] bitflyer
- [x] zb

## Data API
- [x] etherscan
Expand All @@ -29,9 +42,7 @@ A cryptocurrency trader for all famous exchanges.

## utils
- [x] trader: API test.
- [x] monitor: Monitor market price and alter.
- [x] arbitrage: arbitrage between exchanges.
- [x] yunbimonitor: monitor yunbi api service.
- [x] tradebot: best trade bot.

## Donation (捐款)
* Donation will make me update this repo quicker, and as a way to support my work.
Expand Down
1 change: 1 addition & 0 deletions bitfinex/bitfinex.go
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ import (
"strings"

"github.com/Akagi201/cryptotrader/model"
bitfinex "github.com/bitfinexcom/bitfinex-api-go/v1"
)

// Bitfinex API data
Expand Down
18 changes: 9 additions & 9 deletions btc9/btc9.go → cex/cex.go
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
// Package btc9 btc9 rest api package
package btc9
// Package cex cex rest api package
package cex

import (
"io/ioutil"
Expand All @@ -13,25 +13,25 @@ import (
)

const (
API = "https://btc9.com/Jsons"
API = "https://cex.com/Jsons"
)

// Btc9 API data
type Btc9 struct {
// Cex API data
type Cex struct {
AccessKey string
SecretKey string
}

// New create new Btc9 API data
func New(accessKey string, secretKey string) *Btc9 {
return &Btc9{
// New create new Cex API data
func New(accessKey string, secretKey string) *Cex {
return &Cex{
AccessKey: accessKey,
SecretKey: secretKey,
}
}

// GetTicker 行情
func (bt *Btc9) GetTicker(base string, quote string) (ticker *model.Ticker, rerr error) {
func (bt *Cex) GetTicker(base string, quote string) (ticker *model.Ticker, rerr error) {
defer func() {
if err := recover(); err != nil {
ticker = nil
Expand Down
Loading

0 comments on commit bdba43b

Please sign in to comment.