mirror of
https://github.com/d0zingcat/gocryptotrader.git
synced 2026-05-14 07:26:47 +00:00
BTSE: Filter no liquidity pairs (#1182)
* BTSE: Filter no liquidity pairs * thrasher: update commentary --------- Co-authored-by: Ryan O'Hara-Reid <ryan.oharareid@thrasher.io>
This commit is contained in:
@@ -55,6 +55,8 @@ type MarketSummary []struct {
|
||||
MaxRiskLimit int `json:"maxRiskLimit"`
|
||||
AvailableSettlement []string `json:"availableSettlement"`
|
||||
Futures bool `json:"futures"`
|
||||
IsMarketOpenToSpot bool `json:"isMarketOpenToSpot"`
|
||||
IsMarketOpentoOTC bool `json:"isMarketOpenToOtc"`
|
||||
}
|
||||
|
||||
// OHLCV holds Open, High Low, Close, Volume data for set symbol
|
||||
|
||||
@@ -248,7 +248,15 @@ func (b *BTSE) FetchTradablePairs(ctx context.Context, a asset.Item) (currency.P
|
||||
}
|
||||
pairs := make([]currency.Pair, 0, len(m))
|
||||
for x := range m {
|
||||
if !m[x].Active {
|
||||
if !m[x].Active ||
|
||||
// BTSE returns 0 for both highest bid and lowest ask if there is
|
||||
// no order book data, so we skip those pairs. There is no way to
|
||||
// take or provide liquidity for these pairs.
|
||||
|
||||
// TODO: Add support for an OTC asset as this eliminates many valid
|
||||
// tradable pairs which are active, OTC only and available on the
|
||||
// front-end.
|
||||
(m[x].LowestAsk == 0 && m[x].HighestBid == 0) {
|
||||
continue
|
||||
}
|
||||
var pair currency.Pair
|
||||
|
||||
Reference in New Issue
Block a user