analyticsquery

package
v1.8.1 Latest Latest
Warning

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

Go to latest
Published: Oct 27, 2022 License: MIT Imports: 3 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var AnalyticsAPIPath = map[string]string{
	"PDEX_V3_POOL_LIQUIDITY_HISTORIES":                 "/api/v1/metrics/pdexv3/pool-liquidity-histories",
	"PDEX_V3_PAIR_RATE_HISTORIES":                      "/api/v1/metrics/pdexv3/pair-rate-histories",
	"PDEX_V3_TRADING_VOLUME_24H":                       "/api/v1/metrics/pdexv3/trading-volume-24h",
	"PDEX_V3_TRADING_VOLUME_AND_PAIR_RATE_CHANGES_24H": "/api/v1/metrics/pdexv3/pools-trading-volume-and-pair-rate-24h",
}

Functions

func APIGetPDexV3PairRateChangesAndVolume24h

func APIGetPDexV3PairRateChangesAndVolume24h(poolIDs []string) (map[string]PDexPoolLiquidity, error)

Types

type PDexPairRate

type PDexPairRate struct {
	High      float64 `json:"High"`
	Low       float64 `json:"Low"`
	Open      float64 `json:"Open"`
	Close     float64 `json:"Close"`
	Average   float64 `json:"Average"`
	Timestamp string  `json:"Timestamp"`
}

type PDexPairRateHistoriesAPIResponse

type PDexPairRateHistoriesAPIResponse struct {
	Error  string         `json:"Error"`
	Result []PDexPairRate `json:"Result"`
}

func APIGetPDexV3PairRateHistories

func APIGetPDexV3PairRateHistories(poolid string, period string, intervals string) (*PDexPairRateHistoriesAPIResponse, error)

type PDexPoolLiquidity

type PDexPoolLiquidity struct {
	Token0RealAmount     float64 `json:"Token0RealAmount"`
	Token1RealAmount     float64 `json:"Token1RealAmount"`
	Token0VirtualAmount  float64 `json:"Token0VirtualAmount"`
	Token1VirtualAmount  float64 `json:"Token1VirtualAmount"`
	ShareAmount          float64 `json:"ShareAmount"`
	RateChangePercentage float64 `json:"RateChangePercentage"`
	TradingVolume24h     float64 `json:"TradingVolume24h"`
	Timestamp            string  `json:"Timestamp"`
}

type PDexPoolLiquidityHistoriesAPIResponse

type PDexPoolLiquidityHistoriesAPIResponse struct {
	Error  string              `json:"Error"`
	Result []PDexPoolLiquidity `json:"Result"`
}

func APIGetPDexV3PoolLiquidityHistories

func APIGetPDexV3PoolLiquidityHistories(poolId string, period string, intervals string) (*PDexPoolLiquidityHistoriesAPIResponse, error)

type PDexPoolRateChangesAPIResponse

type PDexPoolRateChangesAPIResponse struct {
	Error  string                     `json:"Error"`
	Result map[string]json.RawMessage `json:"Result"`
}

type PDexSummaryData

type PDexSummaryData struct {
	Value float64 `json:"Value"`
}

type PDexSummaryDataAPIResponse

type PDexSummaryDataAPIResponse struct {
	Error  string          `json:"Error"`
	Result PDexSummaryData `json:"Result"`
}

func APIGetPDexV3TradingVolume24H

func APIGetPDexV3TradingVolume24H(pairName string) (*PDexSummaryDataAPIResponse, error)

Jump to

Keyboard shortcuts

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