Skip to content

Commit

Permalink
okcoin: Remove exchange implementation
Browse files Browse the repository at this point in the history
  • Loading branch information
thrasher- committed Aug 22, 2024
1 parent 03e9809 commit d59ea5a
Show file tree
Hide file tree
Showing 31 changed files with 3 additions and 8,845 deletions.
1 change: 0 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,6 @@ Join our slack to discuss all things related to GoCryptoTrader! [GoCryptoTrader
| Kraken | Yes | Yes | NA |
| Kucoin | Yes | Yes | NA |
| Lbank | Yes | No | NA |
| Okcoin | Yes | Yes | No |
| Okx | Yes | Yes | NA |
| Poloniex | Yes | Yes | NA |
| Yobit | Yes | NA | NA |
Expand Down
6 changes: 1 addition & 5 deletions cmd/apichecker/apicheck.go
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,6 @@ const (
github = "GitHub Sha Check"
htmlScrape = "HTML String Check"
pathBinance = "https://binance-docs.github.io/apidocs/spot/en/#change-log"
pathOkCoin = "https://www.okcoin.com/docs/en/#change-change"
pathBTSE = "https://www.btse.com/apiexplorer/spot/#btse-spot-api"
pathBitfinex = "https://docs.bitfinex.com/docs/changelog"
pathBitmex = "https://www.bitmex.com/static/md/en-US/apiChangelog"
Expand Down Expand Up @@ -63,7 +62,6 @@ const (
createCard = "UpdatesCard"
createChecklist = "UpdatesChecklist"
btcMarkets = "BTC Markets"
okcoin = "Okcoin"
)

var (
Expand Down Expand Up @@ -483,8 +481,6 @@ func checkChangeLog(htmlData *HTMLScrapingData) (string, error) {
dataStrings, err = htmlScrapeAlphaPoint(htmlData)
case pathYobit:
dataStrings, err = htmlScrapeYobit(htmlData)
case pathOkCoin:
dataStrings, err = htmlScrapeOk(htmlData)
default:
dataStrings, err = htmlScrapeDefault(htmlData)
}
Expand Down Expand Up @@ -1143,7 +1139,7 @@ func nameStateChanges(currentName, currentState string) (string, error) {
var num int64
var err error
switch currentName {
case btcMarkets, okcoin:
case btcMarkets:
if strings.Count(currentName, " ") == 2 {
exists = true
}
Expand Down
17 changes: 0 additions & 17 deletions cmd/apichecker/apicheck_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -246,23 +246,6 @@ func TestHTMLScrapeHitBTC(t *testing.T) {
}
}

func TestHTMLScrapeDefault(t *testing.T) {
t.Parallel()
data := HTMLScrapingData{TokenData: "h3",
Key: "id",
Val: "change-change",
TokenDataEnd: "section",
TextTokenData: "p",
DateFormat: "2006-01-02",
RegExp: "(2\\d{3}-\\d{1,2}-\\d{1,2})",
CheckString: "2019-04-28",
Path: "https://www.okcoin.com/docs/en/#change-change"}
_, err := htmlScrapeDefault(&data)
if err != nil {
t.Error(err)
}
}

func TestHTMLScrapeBTSE(t *testing.T) {
t.Parallel()
data := HTMLScrapingData{RegExp: `^version: \d{1}.\d{1}.\d{1}`,
Expand Down
16 changes: 0 additions & 16 deletions cmd/apichecker/testupdates.json
Original file line number Diff line number Diff line change
Expand Up @@ -302,22 +302,6 @@
},
"Disabled": false
},
{
"Name": "Okcoin",
"CheckType": "HTML String Check",
"Data": {
"HTMLData": {
"TokenData": "a",
"Key": "href",
"Val": "./#change-change",
"TokenDataEnd": "./#change-",
"RegExp": "./#change-\\d{8}",
"CheckString": "20200229",
"Path": "https://www.okcoin.com/docs/en/#change-change"
}
},
"Disabled": false
},
{
"Name": "Gemini",
"CheckType": "HTML String Check",
Expand Down
16 changes: 0 additions & 16 deletions cmd/apichecker/updates.json
Original file line number Diff line number Diff line change
Expand Up @@ -302,22 +302,6 @@
},
"Disabled": false
},
{
"Name": "Okcoin",
"CheckType": "HTML String Check",
"Data": {
"HTMLData": {
"TokenData": "a",
"Key": "href",
"Val": "./#change-change",
"TokenDataEnd": "./#change-",
"RegExp": "./#change-\\d{8}",
"CheckString": "20200229",
"Path": "https://www.okcoin.com/docs/en/#change-change"
}
},
"Disabled": false
},
{
"Name": "Gemini",
"CheckType": "HTML String Check",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,6 @@ _b in this context is an `IBotExchange` implemented struct_
| Kraken | Yes | Yes | No |
| Kucoin | Yes | No | Yes |
| Lbank | Yes | No | Yes |
| Okcoin | Yes | Yes | Yes |
| Okx | Yes | Yes | Yes |
| Poloniex | Yes | Yes | Yes |
| Yobit | Yes | NA | No |
Expand Down
106 changes: 0 additions & 106 deletions cmd/documentation/exchanges_templates/okcoin.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 @@ -41,7 +41,6 @@ Join our slack to discuss all things related to GoCryptoTrader! [GoCryptoTrader
| Kraken | Yes | Yes | NA |
| Kucoin | Yes | Yes | NA |
| Lbank | Yes | No | NA |
| Okcoin | Yes | Yes | No |
| Okx | Yes | Yes | NA |
| Poloniex | Yes | Yes | NA |
| Yobit | Yes | NA | NA |
Expand Down
2 changes: 0 additions & 2 deletions config/config.go
Original file line number Diff line number Diff line change
Expand Up @@ -846,8 +846,6 @@ func (c *Config) CheckExchangeConfigValues() error {
for i := range c.Exchanges {
if strings.EqualFold(c.Exchanges[i].Name, "GDAX") {
c.Exchanges[i].Name = "CoinbasePro"
} else if strings.EqualFold(c.Exchanges[i].Name, "OKCOIN International") {
c.Exchanges[i].Name = "Okcoin"
}

// Check to see if the old API storage format is used
Expand Down
9 changes: 0 additions & 9 deletions config/config_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -1317,15 +1317,6 @@ func TestCheckExchangeConfigValues(t *testing.T) {
t.Error("exchange name should have been updated from GDAX to CoinbasePRo")
}

cfg.Exchanges[0].Name = "OKCOIN International"
err = cfg.CheckExchangeConfigValues()
if err != nil {
t.Error(err)
}
if cfg.Exchanges[0].Name != "Okcoin" {
t.Error("exchange name should have been updated from 'OKCOIN International' to 'Okcoin'")
}

// Test API settings migration
sptr := func(s string) *string { return &s }
int64ptr := func(i int64) *int64 { return &i }
Expand Down
79 changes: 0 additions & 79 deletions config_example.json
Original file line number Diff line number Diff line change
Expand Up @@ -2110,85 +2110,6 @@
}
]
},
{
"name": "Okcoin",
"enabled": true,
"verbose": false,
"httpTimeout": 15000000000,
"websocketResponseCheckTimeout": 30000000,
"websocketResponseMaxLimit": 7000000000,
"websocketTrafficTimeout": 30000000000,
"websocketOrderbookBufferLimit": 5,
"baseCurrencies": "USD",
"currencyPairs": {
"requestFormat": {
"uppercase": true,
"delimiter": "-"
},
"configFormat": {
"uppercase": true,
"delimiter": "-"
},
"useGlobalFormat": true,
"assetTypes": [
"spot"
],
"pairs": {
"spot": {
"enabled": "BTC-USD",
"available": "BTC-USD,LTC-USD,ETH-USD,ETC-USD,TUSD-USD,CELO-USD,BCH-USD,EOS-USD,XRP-USD,TRX-USD,BSV-USD,USDT-USD,USDK-USD,USDC-USD,DAI-USD,EURS-USD,HBAR-USD,PAX-USD,BTC-USDT,BTC-SGD,ETH-SGD,BTC-EUR,BTC-EURS,ETH-EUR,BCH-EUR,EURS-EUR"
}
}
},
"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"
},
"credentialsValidator": {
"requiresKey": true,
"requiresSecret": true,
"requiresClientID": true
}
},
"features": {
"supports": {
"restAPI": true,
"restCapabilities": {
"tickerBatching": true,
"autoPairUpdates": true
},
"websocketAPI": true,
"websocketCapabilities": {}
},
"enabled": {
"autoPairUpdates": true,
"websocketAPI": false
}
},
"bankAccounts": [
{
"enabled": false,
"bankName": "",
"bankAddress": "",
"bankPostalCode": "",
"bankPostalCity": "",
"bankCountry": "",
"accountName": "",
"accountNumber": "",
"swiftCode": "",
"iban": "",
"supportedCurrencies": ""
}
]
},
{
"name": "Okx",
"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 @@ -217,7 +217,6 @@ Yes means supported, No means not yet implemented and NA means protocol unsuppor
| Kraken | Yes | Yes | NA |
| Kucoin | Yes | Yes | No |
| Lbank | Yes | No | NA |
| Okcoin | Yes | Yes | No |
| Okx | Yes | Yes | NA |
| Poloniex | Yes | Yes | NA |
| Yobit | Yes | NA | NA |
Expand Down Expand Up @@ -247,7 +246,6 @@ var Exchanges = []string{
"kraken",
"kucoin",
"lbank",
"okcoin",
"okx",
"poloniex",
"yobit",
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 @@ -64,7 +64,6 @@ $ ./gctcli withdrawcryptofunds --exchange=binance --currency=USDT --address=TJU9
| Kraken | Yes | Yes | Front-end and API don't match total available transfer chains |
| Kucoin | Yes | Yes | |
| Lbank | No | No | |
| Okcoin | Yes | Yes | |
| Okx | Yes | Yes | |
| Poloniex | Yes | Yes | |
| Yobit | No | No | |
1 change: 0 additions & 1 deletion docs/OHLCV.md
Original file line number Diff line number Diff line change
Expand Up @@ -86,7 +86,6 @@ A helper tool [cmd/dbseed](../cmd/dbseed/README.md) has been created for assisti
| Kraken | Y |
| Kucoin | Y |
| lBank | Y |
| Okcoin | Y |
| Okx | Y |
| Poloniex | Y |
| Yobit | |
3 changes: 0 additions & 3 deletions engine/helpers.go
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,6 @@ import (
"github.com/thrasher-corp/gocryptotrader/exchanges/kraken"
"github.com/thrasher-corp/gocryptotrader/exchanges/kucoin"
"github.com/thrasher-corp/gocryptotrader/exchanges/lbank"
"github.com/thrasher-corp/gocryptotrader/exchanges/okcoin"
"github.com/thrasher-corp/gocryptotrader/exchanges/okx"
"github.com/thrasher-corp/gocryptotrader/exchanges/orderbook"
"github.com/thrasher-corp/gocryptotrader/exchanges/poloniex"
Expand Down Expand Up @@ -1036,8 +1035,6 @@ func NewSupportedExchangeByName(name string) (exchange.IBotExchange, error) {
return new(kucoin.Kucoin), nil
case "lbank":
return new(lbank.Lbank), nil
case "okcoin":
return new(okcoin.Okcoin), nil
case "okx":
return new(okx.Okx), nil
case "poloniex":
Expand Down
Loading

0 comments on commit d59ea5a

Please sign in to comment.