Skip to content

Commit

Permalink
ItBit: Remove exchange implementation (thrasher-corp#1463)
Browse files Browse the repository at this point in the history
  • Loading branch information
thrasher- authored Feb 14, 2024
1 parent 08da42d commit 9f96815
Show file tree
Hide file tree
Showing 25 changed files with 1 addition and 2,225 deletions.
1 change: 0 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,6 @@ Join our slack to discuss all things related to GoCryptoTrader! [GoCryptoTrader
| Gemini | Yes | Yes | No |
| HitBTC | Yes | Yes | No |
| Huobi.Pro | Yes | Yes | NA |
| ItBit | Yes | NA | No |
| Kraken | Yes | Yes | NA |
| Kucoin | Yes | Yes | NA |
| Lbank | Yes | No | NA |
Expand Down
38 changes: 0 additions & 38 deletions cmd/apichecker/apicheck.go
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,6 @@ const (
pathBitmex = "https://www.bitmex.com/static/md/en-US/apiChangelog"
pathANX = "https://anxv3.docs.apiary.io/"
pathPoloniex = "https://docs.poloniex.com/#changelog"
pathIbBit = "https://api.itbit.com/docs"
pathBTCMarkets = "https://api.btcmarkets.net/openapi/info/index.yaml"
pathEXMO = "https://exmo.com/en/api/"
pathBitstamp = "https://www.bitstamp.net/api/"
Expand Down Expand Up @@ -468,8 +467,6 @@ func checkChangeLog(htmlData *HTMLScrapingData) (string, error) {
dataStrings, err = htmlScrapeANX(htmlData)
case pathPoloniex:
dataStrings, err = htmlScrapePoloniex(htmlData)
case pathIbBit:
dataStrings, err = htmlScrapeItBit(htmlData)
case pathBTCMarkets:
dataStrings, err = htmlScrapeBTCMarkets(htmlData)
case pathEXMO:
Expand Down Expand Up @@ -963,41 +960,6 @@ loop:
return resp, nil
}

// htmlScrapeItBit gets the check string for ItBit Exchange
func htmlScrapeItBit(htmlData *HTMLScrapingData) ([]string, error) {
var resp []string
temp, err := sendHTTPGetRequest(htmlData.Path, nil)
if err != nil {
return nil, err
}
defer temp.Body.Close()
tokenizer := html.NewTokenizer(temp.Body)
loop:
for {
next := tokenizer.Next()
switch next {
case html.ErrorToken:
break loop
case html.StartTagToken:
token := tokenizer.Token()
if token.Data == htmlData.TokenData {
for _, z := range token.Attr {
if z.Key == htmlData.Key {
r, err := regexp.Compile(htmlData.RegExp)
if err != nil {
return resp, err
}
if r.MatchString(z.Val) {
resp = append(resp, z.Val)
}
}
}
}
}
}
return resp, nil
}

// htmlScrapeBitstamp gets the check string for Bitstamp Exchange
func htmlScrapeBitstamp(htmlData *HTMLScrapingData) ([]string, error) {
temp, err := sendHTTPGetRequest(htmlData.Path, nil)
Expand Down
15 changes: 0 additions & 15 deletions cmd/apichecker/apicheck_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -317,21 +317,6 @@ func TestHTMLPoloniex(t *testing.T) {
}
}

func TestHTMLItBit(t *testing.T) {
t.Parallel()
data := HTMLScrapingData{TokenData: "a",
Key: "href",
Val: "changelog",
TokenDataEnd: "div",
TextTokenData: "h2",
DateFormat: "2006-01-02",
RegExp: `^https://api.itbit.com/v\d{1}/$`,
Path: "https://api.itbit.com/docs"}
if _, err := htmlScrapeItBit(&data); err != nil {
t.Error(err)
}
}

func TestHTMLScrapeExmo(t *testing.T) {
t.Parallel()
data := HTMLScrapingData{RegExp: `Last updated on [\s\S]*, 20\d{2}`,
Expand Down
14 changes: 0 additions & 14 deletions cmd/apichecker/testupdates.json
Original file line number Diff line number Diff line change
Expand Up @@ -169,20 +169,6 @@
},
"Disabled": false
},
{
"Name": "ItBit",
"CheckType": "HTML String Check",
"Data": {
"HTMLData": {
"TokenData": "a",
"Key": "href",
"RegExp": "^https://api.itbit.com/v\\d{1}/$",
"CheckString": "https://api.itbit.com/v1/",
"Path": "https://api.itbit.com/docs"
}
},
"Disabled": false
},
{
"Name": "Bitmex",
"CheckType": "HTML String Check",
Expand Down
14 changes: 0 additions & 14 deletions cmd/apichecker/updates.json
Original file line number Diff line number Diff line change
Expand Up @@ -169,20 +169,6 @@
},
"Disabled": false
},
{
"Name": "ItBit",
"CheckType": "HTML String Check",
"Data": {
"HTMLData": {
"TokenData": "a",
"Key": "href",
"RegExp": "^https://api.itbit.com/v\\d{1}/$",
"CheckString": "https://api.itbit.com/v1/",
"Path": "https://api.itbit.com/docs"
}
},
"Disabled": false
},
{
"Name": "Bitmex",
"CheckType": "HTML String Check",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,6 @@ _b in this context is an `IBotExchange` implemented struct_
| Gemini | Yes | Yes | Yes |
| HitBTC | Yes | Yes | Yes |
| Huobi.Pro | Yes | Yes | No |
| ItBit | Yes | NA | No |
| Kraken | Yes | Yes | No |
| Kucoin | Yes | No | Yes |
| Lbank | Yes | No | Yes |
Expand Down
98 changes: 0 additions & 98 deletions cmd/documentation/exchanges_templates/itbit.tmpl

This file was deleted.

1 change: 0 additions & 1 deletion cmd/documentation/root_templates/root_readme.tmpl
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,6 @@ Join our slack to discuss all things related to GoCryptoTrader! [GoCryptoTrader
| Gemini | Yes | Yes | No |
| HitBTC | Yes | Yes | No |
| Huobi.Pro | Yes | Yes | NA |
| ItBit | Yes | NA | No |
| Kraken | Yes | Yes | NA |
| Kucoin | Yes | Yes | NA |
| Lbank | Yes | No | NA |
Expand Down
4 changes: 0 additions & 4 deletions cmd/exchange_wrapper_coverage/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -34,10 +34,6 @@ func main() {
var wg sync.WaitGroup
for i := range exchange.Exchanges {
name := exchange.Exchanges[i]
if name == "ftx" {
log.Println("Skipping exchange FTX...")
continue
}
wg.Add(1)
go func() {
defer wg.Done()
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -602,7 +602,6 @@ var unsupportedExchangeNames = []string{
"testexch",
"alphapoint",
"bitflyer", // Bitflyer has many "ErrNotYetImplemented, which is true, but not what we care to test for here
"itbit", // itbit has no way of retrieving pair data
"btse", // TODO rm once timeout issues resolved
"poloniex", // outdated API // TODO rm once updated
}
Expand Down
75 changes: 0 additions & 75 deletions config_example.json
Original file line number Diff line number Diff line change
Expand Up @@ -1919,81 +1919,6 @@
}
]
},
{
"name": "ITBIT",
"enabled": true,
"verbose": false,
"httpTimeout": 15000000000,
"websocketResponseCheckTimeout": 30000000,
"websocketResponseMaxLimit": 7000000000,
"websocketTrafficTimeout": 30000000000,
"websocketOrderbookBufferLimit": 5,
"baseCurrencies": "USD,SGD",
"currencyPairs": {
"requestFormat": {
"uppercase": true
},
"configFormat": {
"uppercase": true
},
"useGlobalFormat": true,
"lastUpdated": 1591062026,
"assetTypes": [
"spot"
],
"pairs": {
"spot": {
"enabled": "XBTUSD,XBTSGD",
"available": "XBTUSD,XBTSGD"
}
}
},
"api": {
"authenticatedSupport": false,
"authenticatedWebsocketApiSupport": false,
"endpoints": {
"url": "NON_DEFAULT_HTTP_LINK_TO_EXCHANGE_API",
"urlSecondary": "NON_DEFAULT_HTTP_LINK_TO_EXCHANGE_API",
"websocketURL": "NON_DEFAULT_HTTP_LINK_TO_WEBSOCKET_EXCHANGE_API"
},
"credentials": {
"key": "Key",
"secret": "Secret",
"clientID": "ClientID"
},
"credentialsValidator": {
"requiresSecret": true,
"requiresClientID": true
}
},
"features": {
"supports": {
"restAPI": true,
"restCapabilities": {},
"websocketAPI": false,
"websocketCapabilities": {}
},
"enabled": {
"autoPairUpdates": false,
"websocketAPI": false
}
},
"bankAccounts": [
{
"enabled": false,
"bankName": "",
"bankAddress": "",
"bankPostalCode": "",
"bankPostalCity": "",
"bankCountry": "",
"accountName": "",
"accountNumber": "",
"swiftCode": "",
"iban": "",
"supportedCurrencies": ""
}
]
},
{
"name": "Kraken",
"enabled": true,
Expand Down
2 changes: 0 additions & 2 deletions docs/ADD_NEW_EXCHANGE.md
Original file line number Diff line number Diff line change
Expand Up @@ -213,7 +213,6 @@ Yes means supported, No means not yet implemented and NA means protocol unsuppor
| Gemini | Yes | Yes | No |
| HitBTC | Yes | Yes | No |
| Huobi.Pro | Yes | Yes | NA |
| ItBit | Yes | NA | No |
| Kraken | Yes | Yes | NA |
| Kucoin | Yes | Yes | No |
| Lbank | Yes | No | NA |
Expand Down Expand Up @@ -243,7 +242,6 @@ var Exchanges = []string{
"gemini",
"hitbtc",
"huobi",
"itbit",
"kraken",
"kucoin",
"lbank",
Expand Down
1 change: 0 additions & 1 deletion docs/MULTICHAIN_TRANSFER_SUPPORT.md
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,6 @@ $ ./gctcli withdrawcryptofunds --exchange=binance --currency=USDT --address=TJU9
| Gemini | No | No | |
| HitBTC | No | No | |
| Huobi.Pro | Yes | Yes | |
| ItBit | No | No | |
| Kraken | Yes | Yes | Front-end and API don't match total available transfer chains |
| Kucoin | Yes | Yes | |
| Lbank | No | No | |
Expand Down
3 changes: 1 addition & 2 deletions docs/OHLCV.md
Original file line number Diff line number Diff line change
Expand Up @@ -81,8 +81,7 @@ A helper tool [cmd/dbseed](../cmd/dbseed/README.md) has been created for assisti
| GateIO | Y |
| Gemini | |
| HitBTC | Y |
| Huobi | Y |
| itBIT | |
| Huobi | Y |
| Kraken | Y |
| Kucoin | Y |
| lBank | Y |
Expand Down
1 change: 0 additions & 1 deletion engine/engine_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -355,7 +355,6 @@ func TestSettingsPrint(t *testing.T) {
}

var unsupportedDefaultConfigExchanges = []string{
"itbit", // due to unsupported API
"poloniex", // poloniex has dropped support for the API GCT has implemented //TODO: drop this when supported
}

Expand Down
Loading

0 comments on commit 9f96815

Please sign in to comment.