task

package
v0.0.0-...-a888265 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jan 7, 2020 License: Apache-2.0 Imports: 22 Imported by: 0

Documentation

Index

Constants

View Source
const HydroExchangeABIV1 = `` /* 869-byte string literal not displayed */
View Source
const HydroExchangeABIV1_1 = `` /* 1074-byte string literal not displayed */
View Source
const HydroExchangeAddressV1 = "0x2cB4B49C0d6E9db2164d94Ce48853BF77C4D883E"
View Source
const HydroExchangeAddressV1_1 = "0xE2a0BFe759e2A4444442Da5064ec549616FFF101"
View Source
const HydroExchangeAddressV2 = "0x241e82C79452F51fbfc89Fac6d912e021dB1a3B7"
View Source
const HydroMatchTopicV1 = "0xdcc6682c66bde605a9e21caeb0cb8f1f6fbd5bbfb2250c3b8d1f43bb9b06df3f"
View Source
const HydroMatchTopicV1_1 = "0xd3ac06c3b34b93617ba2070b8b7a925029035b3f30fecd2d0fa8e5845724f310"
View Source
const HydroMatchTopicV2 = "0x6bf96fcc2cec9e08b082506ebbc10114578a497ff1ea436628ba8996b750677c"
View Source
const HydroStartBlockNumberV1 = 6885289
View Source
const HydroStartBlockNumberV1_1 = 7454912
View Source
const HydroStartBlockNumberV2 = 8399662
View Source
const MaxReties = 5
View Source
const ProtocolV1 = "1"
View Source
const ProtocolV1_1 = "1.1"
View Source
const ProtocolV2 = "2"

Variables

View Source
var EthClient *ethclient.Client
View Source
var ResourcePath = "/resource"

Functions

func CreateRelayerByAddressIfNotExist

func CreateRelayerByAddressIfNotExist(address string)

func FetchHistoricalLogs

func FetchHistoricalLogs(fetchAll bool)

func FetchRecentLogs

func FetchRecentLogs()

func GetToken

func GetToken(address string) models.Token

func InitEthClient

func InitEthClient()

func SubscribeLogs

func SubscribeLogs()

subscriber is deprecated

func UpdateHistoryTradePrice

func UpdateHistoryTradePrice()

func UpdateIndicators

func UpdateIndicators()

func UpdateOnlyVolumeUSD

func UpdateOnlyVolumeUSD()

func UpdateRelayerTrades24h

func UpdateRelayerTrades24h()

func UpdateRelayerVolume24h

func UpdateRelayerVolume24h()

func UpdateRelayers

func UpdateRelayers()

func UpdateTokenPrices

func UpdateTokenPrices()

func UpdateTokenTrades24h

func UpdateTokenTrades24h()

func UpdateTokenVolume1m

func UpdateTokenVolume1m()

func UpdateTokenVolume24h

func UpdateTokenVolume24h()

func UpdateTokenVolume7d

func UpdateTokenVolume7d()

func UpdateTokenVolumeAll

func UpdateTokenVolumeAll()

Types

type CoinmarketcapHistoryPrice

type CoinmarketcapHistoryPrice struct {
	PriceUSD [][]decimal.Decimal `json:"price_usd"`
}

type Indicators

type Indicators struct {
	Volume24h       decimal.Decimal `json:"volume24h"`
	Trades24h       decimal.Decimal `json:"trades24h"`
	Traders24h      decimal.Decimal `json:"traders24h"`
	MarketRabate24h decimal.Decimal `json:"marketRabate24h"`
	Volume          decimal.Decimal `json:"volume"`
	Trades          decimal.Decimal `json:"trades"`
	Traders         decimal.Decimal `json:"traders"`
	Timestamp       int64           `json:"timestamp"`
}

type MatchEventV1

type MatchEventV1 struct {
	BaseToken        common.Address
	QuoteToken       common.Address
	Relayer          common.Address
	Maker            common.Address
	Taker            common.Address
	BaseTokenAmount  *big.Int
	QuoteTokenAmount *big.Int
	MakerFee         *big.Int
	TakerFee         *big.Int
	MakerGasFee      *big.Int
	MakerRebate      *big.Int
	TakerGasFee      *big.Int
}

type MatchEventV1_1

type MatchEventV1_1 struct {
	AddressSet OrderAddressSet
	Result     MatchResult
}

type MatchResult

type MatchResult struct {
	Maker                  common.Address
	Taker                  common.Address
	Buyer                  common.Address
	MakerFee               *big.Int
	MakerRebate            *big.Int
	TakerFee               *big.Int
	MakerGasFee            *big.Int
	TakerGasFee            *big.Int
	BaseTokenFilledAmount  *big.Int
	QuoteTokenFilledAmount *big.Int
}

type MissingTime

type MissingTime struct {
	Min time.Time
	Max time.Time
}

type OrderAddressSet

type OrderAddressSet struct {
	BaseToken  common.Address
	QuoteToken common.Address
	Relayer    common.Address
}

type RelayerInfo

type RelayerInfo struct {
	Url     string `json:"url"`
	Address string `json:"address"`
	Name    string `json:"name"`
	Slug    string `json:"slug"`
}

type RelayerTrades24hData

type RelayerTrades24hData struct {
	Trades24h        uint64
	Trades24hChange  float32
	Traders24h       uint64
	Traders24hChange float32
}

func GetRelayerTrades24hData

func GetRelayerTrades24hData(address string) RelayerTrades24hData

type TokenInfo

type TokenInfo struct {
	Name              string `json:"name"`
	Symbol            string `json:"symbol"`
	Decimals          string
	DecimalsInterface interface{} `json:"decimals"` // ethplorer api return decimals type can be string or number
	TotalSupply       string      `json:"totalSupply"`
	HoldersCount      uint64      `json:"holdersCount"`
	Price             TokenPrice  `json:"price"`
}

func GetTokenInfo

func GetTokenInfo(address string) TokenInfo

type TokenPrice

type TokenPrice struct {
	Rate decimal.Decimal `json:"rate"`
	TS   int64           `json:"ts"`
}

type TokenTrades24hData

type TokenTrades24hData struct {
	Trades24h        uint64
	Trades24hChange  float32
	Traders24h       uint64
	Traders24hChange float32
	Amount24h        decimal.Decimal
}

func GetTokenTrades24hData

func GetTokenTrades24hData(address string) TokenTrades24hData

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL