exchanges: Remove FTX implementation and fix minor test issues (#1100)

* exchanges: Start removal of FTX

* Get tests happy again

* okx: improve logic and add basic coverage

* Fix linterino

* Round 2 plus rm useless assignment in test

* Fix exchange_wrapper_issues test error

* Fix nitters

* Address nitters
This commit is contained in:
Adrian Gallagher
2023-01-25 16:40:04 +11:00
committed by GitHub
parent 05558aabfb
commit c785ae73a7
57 changed files with 211 additions and 9661 deletions

View File

@@ -155,7 +155,7 @@ The following is a screenshot of the relationship between relevant data history
| created | The date the job was created | `2020-01-01T13:33:37Z` |
| conversion_interval | When converting data as a job, this determines the resulting interval | `86400000000000` |
| overwrite_data | If data already exists, the setting allows you to overwrite it | `true` |
| secondary_exchange_id | For a `secondaryvalidatecandles` job, the exchange id of the exchange to compare data to | `ftx` |
| secondary_exchange_id | For a `secondaryvalidatecandles` job, the exchange id of the exchange to compare data to | `bybit` |
| decimal_place_comparison | When validating API candles, this will round the data to the supplied decimal point to check for equality | `3` |
| replace_on_issue | When there is an issue validating candles for a `validatecandles` job, the API data will overwrite the existing candle data | `false` |

View File

@@ -56,7 +56,6 @@ _b in this context is an `IBotExchange` implemented struct_
| CoinbasePro | Yes | Yes | No|
| COINUT | Yes | Yes | No |
| Exmo | Yes | NA | No |
| FTX | Yes | Yes | Yes |
| GateIO | Yes | Yes | No |
| Gemini | Yes | Yes | Yes |
| HitBTC | Yes | Yes | Yes |

View File

@@ -1,99 +0,0 @@
{{define "exchanges ftx" -}}
{{template "header" .}}
## FTX Exchange
### Current Features
+ REST Support
+ Websocket Support
### How to enable
+ [Enable via configuration](https://github.com/thrasher-corp/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 f exchange.IBotExchange
for i := range bot.Exchanges {
if bot.Exchanges[i].GetName() == "FTX" {
f = bot.Exchanges[i]
}
}
// Public calls - wrapper functions
// Fetches current ticker information
tick, err := f.FetchTicker()
if err != nil {
// Handle error
}
// Fetches current orderbook information
ob, err := f.FetchOrderbook()
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 := f.GetAccountInfo()
if err != nil {
// Handle error
}
```
+ If enabled via individually importing package, rudimentary example below:
```go
// Public calls
// Fetches current ticker information
ticker, err := f.GetTicker()
if err != nil {
// Handle error
}
// Fetches current orderbook information
ob, err := f.GetOrderBook()
if err != nil {
// Handle error
}
// Private calls - make sure your APIKEY and APISECRET are set and
// AuthenticatedAPISupport is set to true
// GetUserInfo returns account info
accountInfo, err := f.GetUserInfo(...)
if err != nil {
// Handle error
}
// Submits an order and the exchange and returns its tradeID
tradeID, err := f.Trade(...)
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

@@ -34,7 +34,6 @@ Join our slack to discuss all things related to GoCryptoTrader! [GoCryptoTrader
| CoinbasePro | Yes | Yes | No|
| COINUT | Yes | Yes | NA |
| Exmo | Yes | NA | NA |
| FTX | Yes | Yes | No |
| GateIO | Yes | Yes | NA |
| Gemini | Yes | Yes | No |
| HitBTC | Yes | Yes | No |