BTSE: Various fixes (#1550)

* Common: DriveBy sanitisation of vars

* BTSE: Unify to exchange OrderLimits

* BTSE: Remove SeedAssets and test GetOrderExcutionLimit

* BTSE: Fix handling for K_* pairs

In addition to the M_ pairs we previously handled, BTSE has now
introduced K_* pairs (K_SATS-USD*).

This change moves the handling over to look for an exponent, and moves
the filtering to happen on all market data.
The original MarketSummary is still availiable, but I can't see any of
our current use-cases wanting to get the unfiltered list

* BTSE: Fix marketSummary futures field

BTSE returns no futures field for futures api marketInfo, and the documentation for the futures api shows returning false.
When we know we asked for futures, it makes the data flow much saner if
we can trust this field and not have to track what asset we asked for

* BTSE: Abstract marketPair.Pair()

* BTSE: Fix UpdateTicker symbol format
This commit is contained in:
Gareth Kirwan
2024-06-14 10:09:19 +07:00
committed by GitHub
parent 4c4b6935be
commit 98f025e38f
7 changed files with 223 additions and 269 deletions

View File

@@ -7,12 +7,10 @@ import (
"strings"
)
// Public errors related to assets
var (
// ErrNotSupported is an error for an unsupported asset type
ErrNotSupported = errors.New("unsupported asset type")
// ErrNotEnabled is an error for an asset not enabled
ErrNotEnabled = errors.New("asset type not enabled")
// ErrInvalidAsset is returned when the assist isn't valid
ErrNotEnabled = errors.New("asset type not enabled")
ErrInvalidAsset = errors.New("asset is invalid")
)