Documentation ¶
Index ¶
- Constants
- Variables
- func Ethers(value int64) *big.Int
- func GetAddressFromPublicKey(pk []byte) common.Address
- func GetLendingChannelID(term uint64, lendingToken common.Address) string
- func GetLendingMarketsChannelID(channel string) string
- func GetLendingOhlcvChannelID(term uint64, lendingToken common.Address, unit string, duration int64) string
- func GetLendingOrderBookChannelID(term uint64, lendingToken common.Address) string
- func GetLendingPairName(term uint64, lendingTokenName string) string
- func GetLendingTradeChannelID(term uint64, lendingToken common.Address) string
- func GetMarketsChannelID(channel string) string
- func GetModTime(ts, interval int64, unit string) (int64, int64)
- func GetOHLCVChannelID(bt, qt common.Address, unit string, duration int64) string
- func GetOrderBookChannelID(bt, qt common.Address) string
- func GetPairKey(bt, qt common.Address) string
- func GetPriceBoardChannelID(bt, qt common.Address) string
- func GetTickChannelID(bt, qt common.Address, unit string, duration int64) string
- func GetTradeChannelID(bt, qt common.Address) string
- func InitLogger(logLevel string)
- func IsNativeTokenByAddress(address common.Address) bool
- func JSON(x interface{}) string
- func ParseLendingChannelID(id string) (uint64, common.Address, error)
- func PrintError(msg string, err error)
- func PrintJSON(x interface{})
- func Retry(retries int, fn func() error) error
- func ToBigInt(s string) *big.Int
- func ToDecimal(value *big.Int) float64
- func UintToPaddedString(num int64) string
- func Union(a, b []common.Address) []common.Address
- func UnitToSecond(interval int64, unit string) int64
- func Use(...interface{})
Constants ¶
View Source
const (
LogPrefix = ""
)
Variables ¶
View Source
var Logger = logging.MustGetLogger("main")
View Source
var StdoutLogger = logging.MustGetLogger("main")
Functions ¶
func GetAddressFromPublicKey ¶
GetAddressFromPublicKey get derived address from public key
func GetLendingChannelID ¶ added in v1.2.0
GetLendingChannelID get channel from term and lending token
func GetLendingMarketsChannelID ¶ added in v1.2.0
GetLendingMarketsChannelID format market chanel id
func GetLendingOhlcvChannelID ¶ added in v1.2.0
func GetLendingOrderBookChannelID ¶ added in v1.2.0
func GetLendingPairName ¶ added in v1.2.0
func GetLendingTradeChannelID ¶ added in v1.2.0
GetLendingTradeChannelID get channel from term and lending token
func GetMarketsChannelID ¶
func GetModTime ¶ added in v1.2.0
GetModTime get round time by step
func GetOHLCVChannelID ¶
func GetOrderBookChannelID ¶
func GetPairKey ¶
GetPairKey return the pair key identifier corresponding to two
func GetPriceBoardChannelID ¶
func GetTickChannelID ¶
GetTickChannelID is used to get the channel id for OHLCV data streaming it takes pairname, duration and units of data streaming
func GetTradeChannelID ¶
func InitLogger ¶ added in v1.2.0
func InitLogger(logLevel string)
func IsNativeTokenByAddress ¶
func ParseLendingChannelID ¶ added in v1.2.0
ParseLendingTradeChannelID parse channel to get term and lending token
func PrintError ¶
func UintToPaddedString ¶
UintToPaddedString converts an int to string of length 19 by padding with 0
func UnitToSecond ¶ added in v1.2.0
UnitToSecond time uint to second
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.