mirror of
https://github.com/d0zingcat/gocryptotrader.git
synced 2026-06-04 07:26:47 +00:00
exchange/order/limits: Migrate to new package and integrate with exchanges (#1860)
* move limits, transition to key gen * rollout NewExchangePairAssetKey everywhere * test improvements * self-review fixes * ok, lets go * fix merge issue * slower value func,assertify,drop IsValidPairString * remove binance reference for backtesting test * Redundant nil checks removed due to redundancy * Update order_test.go * Move limits back into /exchanges/ * puts limits in a different box again * SHAZBERT SPECIAL SUGGESTIONS * Update gateio_wrapper.go * fixes all build issues * Many niteroos! * something has gone awry * bugfix * gk's everywhere nits * lint * extra lint * re-remove IsValidPairString * lint fix * standardise test * revert some bads * dupe rm * another revert 360 mcgee * un-in-revertify * Update exchange/order/limits/levels_test.go Co-authored-by: Adrian Gallagher <adrian.gallagher@thrasher.io> * fix * Update exchanges/binance/binance_test.go HERE'S HOPING GITHUB FORMATS THIS CORRECTLY! Co-authored-by: Gareth Kirwan <gbjkirwan@gmail.com> * update text * rn func, same line err gk4202000 --------- Co-authored-by: Adrian Gallagher <adrian.gallagher@thrasher.io> Co-authored-by: Gareth Kirwan <gbjkirwan@gmail.com>
This commit is contained in:
@@ -1264,12 +1264,7 @@ func (e *Exchange) GetOpenInterest(ctx context.Context, k ...key.PairAsset) ([]f
|
||||
continue
|
||||
}
|
||||
resp = append(resp, futures.OpenInterest{
|
||||
Key: key.ExchangePairAsset{
|
||||
Exchange: e.Name,
|
||||
Base: symbol.Base.Item,
|
||||
Quote: symbol.Quote.Item,
|
||||
Asset: a,
|
||||
},
|
||||
Key: key.NewExchangeAssetPair(e.Name, a, symbol),
|
||||
OpenInterest: activeInstruments[i].OpenInterest,
|
||||
})
|
||||
}
|
||||
@@ -1296,12 +1291,7 @@ func (e *Exchange) GetOpenInterest(ctx context.Context, k ...key.PairAsset) ([]f
|
||||
}
|
||||
resp := make([]futures.OpenInterest, 1)
|
||||
resp[0] = futures.OpenInterest{
|
||||
Key: key.ExchangePairAsset{
|
||||
Exchange: e.Name,
|
||||
Base: k[0].Base,
|
||||
Quote: k[0].Quote,
|
||||
Asset: k[0].Asset,
|
||||
},
|
||||
Key: key.NewExchangeAssetPair(e.Name, k[0].Asset, k[0].Pair()),
|
||||
OpenInterest: instrument[0].OpenInterest,
|
||||
}
|
||||
return resp, nil
|
||||
|
||||
Reference in New Issue
Block a user