apiv1

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: 11 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ApplyRoutes

func ApplyRoutes(r *gin.RouterGroup)

func GetRelayer

func GetRelayer(c *gin.Context)

func GetRelayers

func GetRelayers(c *gin.Context)

func GetToken

func GetToken(c *gin.Context)

func GetTokens

func GetTokens(c *gin.Context)

func GetTrade

func GetTrade(c *gin.Context)

func GetTrader

func GetTrader(c *gin.Context)

func GetTrades

func GetTrades(c *gin.Context)

func GetTradesChart

func GetTradesChart(c *gin.Context)

func GetTradesIndicators

func GetTradesIndicators(c *gin.Context)

func GetTradesSearch

func GetTradesSearch(c *gin.Context)

Types

type ChartItem

type ChartItem struct {
	Dt           time.Time       `json:"date"`
	Sum          decimal.Decimal `json:"volume"`
	TradesCount  uint64          `json:"trades"`
	TradersCount uint64          `json:"traders"`
}

type RelayerRes

type RelayerRes struct {
	Name             string          `json:"name"`
	Url              string          `json:"url"`
	Slug             string          `json:"slug"`
	Address          string          `json:"address"`
	Volume24h        decimal.Decimal `json:"volume24h"`
	Volume24hLast    decimal.Decimal `json:"volume24hLast"`
	Volume24hChange  float32         `json:"volume24hChange"`
	Trades24h        decimal.Decimal `json:"trades24h"`
	Trades24hLast    decimal.Decimal `json:"trades24hLast"`
	Trades24hChange  float32         `json:"trades24hChange"`
	Traders24h       decimal.Decimal `json:"traders24h"`
	Traders24hLast   decimal.Decimal `json:"traders24hLast"`
	Traders24hChange float32         `json:"traders24hChange"`
	TopTokens        []TopToken      `json:"topTokens"`
}

type TokenRes

type TokenRes struct {
	Address         string          `json:"address"`
	Name            string          `json:"name"`
	Symbol          string          `json:"symbol"`
	Volume24h       decimal.Decimal `gorm:"column:volume_24h" json:"volume24h"`
	Amount24h       decimal.Decimal `json:"amount24h"`
	Volume24hLast   decimal.Decimal `gorm:"column:volume_24h_last" json:"volume24hLast"`
	Volume24hChange float32         `gorm:"column:volume_24h_change" json:"volume24hChange"`
	Traders24h      uint64          `json:"traders24h"`
	PriceUSD        decimal.Decimal `gorm:"column:price_usd" json:"priceUSD"`
	PriceUpdatedAt  time.Time       `gorm:"column:price_updated_at" json:"priceUpdatedAt"`

	// for top tokens
	Volume7d       decimal.Decimal `gorm:"column:volume_7d;type:decimal(32,18)" json:"volume7d"`
	Volume7dChange float32         `gorm:"column:volume_7d_change" json:"volume7dChange"`
	VolumeAll      decimal.Decimal `gorm:"column:volume_all;type:decimal(32,18)" json:"volumeAll"`
}

type TokensQuery

type TokensQuery struct {
	Page           int    `form:"page"`
	PageSize       int    `form:"pageSize"`
	Filter         string `form:"filter"`
	Keyword        string `form:"keyword"`
	TraderAddress  string `form:"traderAddress"`
	RelayerAddress string `form:"relayerAddress"`
}

type TokensRes

type TokensRes struct {
	Page     int        `json:"page"`
	PageSize int        `json:"pageSize"`
	Count    uint64     `json:"count"`
	Tokens   []TokenRes `json:"tokens"`
}

type TopToken

type TopToken struct {
	Address      string          `json:"address"`
	Name         string          `json:"name"`
	Symbol       string          `json:"symbol"`
	Volume       decimal.Decimal `json:"volume"`
	VolumeLast   decimal.Decimal `json:"volumeLast"`
	VolumeChange float32         `json:"volumeChange"`
}

type TraderRes

type TraderRes struct {
	Address          string          `json:"address"`
	Volume24h        decimal.Decimal `json:"volume24h"`
	Volume24hLast    decimal.Decimal `json:"volume24hLast"`
	Volume24hChange  float32         `json:"volume24hChange"`
	Trades24h        decimal.Decimal `json:"trades24h"`
	Trades24hLast    decimal.Decimal `json:"trades24hLast"`
	Trades24hChange  float32         `json:"trades24hChange"`
	TotalMakerRebate decimal.Decimal `json:"totalMakerRebate"`
	TopTokens        []TopToken      `json:"topTokens"`
}

type TradesChartQuery

type TradesChartQuery struct {
	Filter         string `form:"filter"`
	TokenAddress   string `form:"tokenAddress"`
	TraderAddress  string `form:"traderAddress"`
	RelayerAddress string `form:"relayerAddress"`
}

type TradesQuery

type TradesQuery struct {
	Page              int    `form:"page"`
	PageSize          int    `form:"pageSize"`
	BaseTokenAddress  string `form:"baseTokenAddress"`
	QuoteTokenAddress string `form:"quoteTokenAddress"`
	TokenAddress      string `form:"tokenAddress"`
	TraderAddress     string `form:"traderAddress"`
	RelayerAddress    string `form:"relayerAddress"`
	Transaction       string `form:"transaction"`
}

Jump to

Keyboard shortcuts

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