mirror of
https://github.com/d0zingcat/gocryptotrader.git
synced 2026-05-14 07:26:47 +00:00
- Modifications made to the request package. Planned improvements will be sending requests on intervals, rate limiter back off support, dynamic tuning and requests packaged into a request job group. - Can modify each exchanges individual HTTP client (e.g timeout and transport settings). - Bot now uses an exchange config HTTP timeout value. - Bot now uses a global HTTP timeout (configurable). - Batched ticker request support for exchanges. - Ticker and Orderbook fetching now are spanned accross multiple go routines and regulated by a sync wait group. - Fixes hack used to load exchanges, now uses a sync wait group. - Ticker and Orderbook storage and fetching now uses mutex locks. - New pair function for finding different pairs between two supplied pair arrays. This is used for currency pair updates for exchange which support dynamic updating. - Shows removal/additions of dynamic updates currencies.
31 lines
816 B
Go
31 lines
816 B
Go
package bitfinex
|
|
|
|
// func TestStart(t *testing.T) {
|
|
// start := Bitfinex{}
|
|
// start.Start(wg *sync.WaitGroup)
|
|
// }
|
|
//
|
|
// func TestRun(t *testing.T) {
|
|
// run := Bitfinex{}
|
|
// run.Run()
|
|
// }
|
|
//
|
|
// func TestGetTickerPrice(t *testing.T) {
|
|
// getTickerPrice := Bitfinex{}
|
|
// getTickerPrice.EnabledPairs = []string{"BTCUSD", "LTCUSD"}
|
|
// _, err := getTickerPrice.GetTickerPrice(pair.NewCurrencyPair("BTC", "USD"),
|
|
// ticker.Spot)
|
|
// if err != nil {
|
|
// t.Errorf("Test Failed - Bitfinex GetTickerPrice() error: %s", err)
|
|
// }
|
|
// }
|
|
//
|
|
// func TestGetOrderbookEx(t *testing.T) {
|
|
// getOrderBookEx := Bitfinex{}
|
|
// _, err := getOrderBookEx.GetOrderbookEx(pair.NewCurrencyPair("BTC", "USD"),
|
|
// ticker.Spot)
|
|
// if err != nil {
|
|
// t.Errorf("Test Failed - Bitfinex GetOrderbookEx() error: %s", err)
|
|
// }
|
|
// }
|