oapigen

package
v0.0.0-...-477d63b Latest Latest
Warning

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

Go to latest
Published: Apr 11, 2024 License: MIT Imports: 10 Imported by: 0

Documentation

Overview

Package oapigen provides primitives to interact with the openapi HTTP API.

Code generated by github.com/deepmap/oapi-codegen DO NOT EDIT.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func GetSwagger

func GetSwagger() (swagger *openapi3.Swagger, err error)

GetSwagger returns the Swagger specification corresponding to the generated code in this file. The external references of Swagger specification are resolved. The logic of resolving external references is tightly connected to "import-mapping" feature. Externally referenced files must be embedded in the corresponding golang packages. Urls can be supported but this task was out of the scope.

func PathToRawSpec

func PathToRawSpec(pathToFile string) map[string]func() ([]byte, error)

Constructs a synthetic filesystem for resolving external references when loading openapi specifications.

Types

type Action

type Action struct {

	// Int64, nano timestamp of the block at which the action was registered
	Date string `json:"date"`

	// Int64, height of the block at which the action was registered
	Height string `json:"height"`

	// Inbound transactions related to the action
	In       []Transaction `json:"in"`
	Metadata Metadata      `json:"metadata"`

	// Outbound transactions related to the action
	Out []Transaction `json:"out"`

	// Pools involved in the action
	Pools []string `json:"pools"`

	// Indicates if the action is completed or if related outbound transactions are still
	// pending.
	Status ActionStatus `json:"status"`

	// Type of action
	Type ActionType `json:"type"`
}

action details among with related transactions

type ActionMeta

type ActionMeta struct {

	// Int64, The last action event_id that can be used for pagination.
	// This token is needed to be given for next page.
	NextPageToken string `json:"nextPageToken"`

	// Int64, The first action event_id that can be used for previous pagination.
	// This token is needed to be given for previous page.
	PrevPageToken string `json:"prevPageToken"`
}

action query metadata

type ActionStatus

type ActionStatus string

Indicates if the action is completed or if related outbound transactions are still pending.

const (
	ActionStatusPending ActionStatus = "pending"

	ActionStatusSuccess ActionStatus = "success"
)

Defines values for ActionStatus.

type ActionType

type ActionType string

Type of action

const (
	ActionTypeAddLiquidity ActionType = "addLiquidity"

	ActionTypeDonate ActionType = "donate"

	ActionTypeRefund ActionType = "refund"

	ActionTypeSwap ActionType = "swap"

	ActionTypeSwitch ActionType = "switch"

	ActionTypeWithdraw ActionType = "withdraw"
)

Defines values for ActionType.

type ActionsResponse

type ActionsResponse struct {
	Actions []Action `json:"actions"`

	// Int64, number of results matching the given filters. It may be -1 if
	// Midgard is having trouble counting the results and has to cancel the count query
	// (temporary fix). Also, if new action parameters is used it won't be returned.
	Count *string `json:"count,omitempty"`

	// action query metadata
	Meta ActionMeta `json:"meta"`
}

ActionsResponse defines model for ActionsResponse.

type AddLiquidityMetadata

type AddLiquidityMetadata struct {

	// Int64, amount of liquidity units assigned to the member as result of the liquidity
	// deposit
	LiquidityUnits string `json:"liquidityUnits"`
}

AddLiquidityMetadata defines model for AddLiquidityMetadata.

type Balance

type Balance struct {
	Coins Coins `json:"coins"`

	// full timestamp (nanoseconds since 1970) of the block at which the returned balance snapshot was valid
	Date string `json:"date"`

	// height of the block at which the returned balance snapshot was valid
	Height string `json:"height"`
}

Balance defines model for Balance.

type BalanceResponse

type BalanceResponse Balance

BalanceResponse defines model for BalanceResponse.

type BlockRewards

type BlockRewards struct {
	BlockReward string `json:"blockReward"`
	BondReward  string `json:"bondReward"`
	PoolReward  string `json:"poolReward"`
}

BlockRewards defines model for BlockRewards.

type BondMetrics

type BondMetrics struct {

	// Int64(e8), Average bond of active nodes
	AverageActiveBond string `json:"averageActiveBond"`

	// Int64(e8), Average bond of standby nodes
	AverageStandbyBond string `json:"averageStandbyBond"`

	// Int64(e8), Highest effective bond for nodes
	BondHardCap string `json:"bondHardCap"`

	// Int64(e8), Maxinum bond of active nodes
	MaximumActiveBond string `json:"maximumActiveBond"`

	// Int64(e8), Maximum bond of standby nodes
	MaximumStandbyBond string `json:"maximumStandbyBond"`

	// Int64(e8), Median bond of active nodes
	MedianActiveBond string `json:"medianActiveBond"`

	// Int64(e8), Median bond of standby nodes
	MedianStandbyBond string `json:"medianStandbyBond"`

	// Int64(e8), Minumum bond of active nodes
	MinimumActiveBond string `json:"minimumActiveBond"`

	// Int64(e8), Minumum bond of standby nodes
	MinimumStandbyBond string `json:"minimumStandbyBond"`

	// Int64(e8), Total bond of active nodes
	TotalActiveBond string `json:"totalActiveBond"`

	// Int64(e8), Total bond of standby nodes
	TotalStandbyBond string `json:"totalStandbyBond"`
}

BondMetrics defines model for BondMetrics.

type BorrowerDetails

type BorrowerDetails struct {

	// List details of all the loans identified with the given address
	Pools []BorrowerPool `json:"pools"`
}

BorrowerDetails defines model for BorrowerDetails.

type BorrowerDetailsResponse

type BorrowerDetailsResponse BorrowerDetails

BorrowerDetailsResponse defines model for BorrowerDetailsResponse.

type BorrowerPool

type BorrowerPool struct {

	// The asset that the borrower used as collateral
	CollateralAsset string `json:"collateral_asset"`

	// Int64(e8), The total amount of collateral that user deposited
	CollateralDeposited string `json:"collateral_deposited"`

	// Int64(e8), The total amount of collateral the system paid back to the user
	CollateralWithdrawn string `json:"collateral_withdrawn"`

	// Int64(e8), The total amount of debt issued as debt for user. denominated in TOR.
	DebtIssuedTor string `json:"debt_issued_tor"`

	// Int64(e8), The total amount of debt that the user paid back. denominated in TOR.
	DebtRepaidTor string `json:"debt_repaid_tor"`

	// Int64, Unix timestamp for the last time borrower opened a loan
	LastOpenLoanTimestamp string `json:"last_open_loan_timestamp"`

	// Int64, Unix timestamp for the last time borrower repayment occurred
	LastRepayLoanTimestamp string   `json:"last_repay_loan_timestamp"`
	TargetAssets           []string `json:"target_assets"`
}

BorrowerPool defines model for BorrowerPool.

type Borrowers

type Borrowers []string

Borrowers defines model for Borrowers.

type BorrowersResponse

type BorrowersResponse Borrowers

BorrowersResponse defines model for BorrowersResponse.

type ChurnItem

type ChurnItem struct {

	// full timestamp (nanoseconds since 1970) of the block at which the churn occurred
	Date string `json:"date"`

	// height of the block at which the churn occurred
	Height string `json:"height"`
}

ChurnItem defines model for ChurnItem.

type Churns

type Churns []ChurnItem

Churns defines model for Churns.

type ChurnsResponse

type ChurnsResponse Churns

ChurnsResponse defines model for ChurnsResponse.

type Coin

type Coin struct {

	// Int64(e8), asset Amount.
	Amount string `json:"amount"`

	// Asset in CHAIN.SYMBOL format
	Asset string `json:"asset"`
}

Represents a digital currency amount

type Coins

type Coins []Coin

Coins defines model for Coins.

type DepthHistory

type DepthHistory struct {
	Intervals DepthHistoryIntervals `json:"intervals"`
	Meta      DepthHistoryMeta      `json:"meta"`
}

DepthHistory defines model for DepthHistory.

type DepthHistoryIntervals

type DepthHistoryIntervals []DepthHistoryItem

DepthHistoryIntervals defines model for DepthHistoryIntervals.

type DepthHistoryItem

type DepthHistoryItem struct {

	// Int64(e8), the amount of Asset in the pool at the end of the interval
	AssetDepth string `json:"assetDepth"`

	// Float, price of asset in rune. I.e. rune amount / asset amount
	AssetPrice string `json:"assetPrice"`

	// Float, the price of asset in USD (based on the deepest USD pool).
	AssetPriceUSD string `json:"assetPriceUSD"`

	// Int64, The end time of bucket in unix timestamp
	EndTime string `json:"endTime"`

	// Int64, Liquidity Units in the pool at the end of the interval
	LiquidityUnits string `json:"liquidityUnits"`

	// Float, The liquidity unit value index. Sqrt(assetDepth * runeDepth)/liquidity units
	Luvi string `json:"luvi"`

	// Int64, Number of liquidity members in the pool at the end of the interval
	MembersCount string `json:"membersCount"`

	// Int64(e8), the amount of Rune in the pool at the end of the interval
	RuneDepth string `json:"runeDepth"`

	// Int64, The beginning time of bucket in unix timestamp
	StartTime string `json:"startTime"`

	// Int64, Synth supply in the pool at the end of the interval
	SynthSupply string `json:"synthSupply"`

	// Int64, Synth Units in the pool at the end of the interval
	SynthUnits string `json:"synthUnits"`

	// Int64, Total Units (synthUnits + liquidityUnits) in the pool at the end of the interval
	Units string `json:"units"`
}

DepthHistoryItem defines model for DepthHistoryItem.

type DepthHistoryItemPool

type DepthHistoryItemPool struct {

	// asset for the given pool
	Pool string `json:"pool"`

	// Int64(e8) in rune, the total value in the pool (both assets and rune) at the end of the interval.
	// Note: this is twice of the pool's Rune depth. (as pools are symmetrically balance)
	TotalDepth string `json:"totalDepth"`
}

DepthHistoryItemPool defines model for DepthHistoryItemPool.

type DepthHistoryMeta

type DepthHistoryMeta struct {

	// Int64(e8), the amount of Asset in the pool at the end of the interval at time endTime
	EndAssetDepth string `json:"endAssetDepth"`

	// Int64, Liquidity Units in the pool at the end of the interval at time endTime
	EndLPUnits string `json:"endLPUnits"`

	// Int64, Number of liquidity members in the pool at the end of the interval at time endTime
	EndMemberCount string `json:"endMemberCount"`

	// Int64(e8), the amount of Rune in the pool at the end of the interval at time endTime
	EndRuneDepth string `json:"endRuneDepth"`

	// Int64, Synth Units in the pool at the end of the interval at time endTime
	EndSynthUnits string `json:"endSynthUnits"`

	// Int64, The end time of bucket in unix timestamp
	EndTime string `json:"endTime"`

	// Float, The liquidity unit value index increase between startTime and endTime
	LuviIncrease string `json:"luviIncrease"`

	// Float, The impermanent loss between the first and last depth item
	PriceShiftLoss string `json:"priceShiftLoss"`

	// Int64(e8), the amount of Asset in the pool at the start of the interval at time
	// startTime
	StartAssetDepth string `json:"startAssetDepth"`

	// Int64, Liquidity Units in the pool at the start of the interval at time startTime
	StartLPUnits string `json:"startLPUnits"`

	// Int64, Number of liquidity member in the pool at the start of the interval at time startTime
	StartMemberCount string `json:"startMemberCount"`

	// Int64(e8), the amount of Rune in the pool at the start of the interval at time startTime
	StartRuneDepth string `json:"startRuneDepth"`

	// Int64, Synth Units in the pool at the start of the interval at time startTime
	StartSynthUnits string `json:"startSynthUnits"`

	// Int64, The beginning time of bucket in unix timestamp
	StartTime string `json:"startTime"`
}

DepthHistoryMeta defines model for DepthHistoryMeta.

type DepthHistoryResponse

type DepthHistoryResponse DepthHistory

DepthHistoryResponse defines model for DepthHistoryResponse.

type EarningsHistory

type EarningsHistory struct {
	Intervals EarningsHistoryIntervals `json:"intervals"`
	Meta      EarningsHistoryItem      `json:"meta"`
}

EarningsHistory defines model for EarningsHistory.

type EarningsHistoryIntervals

type EarningsHistoryIntervals []EarningsHistoryItem

EarningsHistoryIntervals defines model for EarningsHistoryIntervals.

type EarningsHistoryItem

type EarningsHistoryItem struct {

	// float64, Average amount of active nodes during the time interval
	AvgNodeCount string `json:"avgNodeCount"`

	// Int64(e8), Total block rewards emitted during the time interval
	BlockRewards string `json:"blockRewards"`

	// Int64(e8), Share of earnings sent to nodes during the time interval
	BondingEarnings string `json:"bondingEarnings"`

	// Int64(e8), System income generated during the time interval. It is the sum of
	// liquidity fees and block rewards
	Earnings string `json:"earnings"`

	// Int64, The end time of interval in unix timestamp
	EndTime string `json:"endTime"`

	// Int64(e8), Share of earnings sent to pools during the time interval
	LiquidityEarnings string `json:"liquidityEarnings"`

	// Int64(e8), Total liquidity fees, converted to RUNE, collected during the time interval
	LiquidityFees string `json:"liquidityFees"`

	// Earnings data for each pool for the time interval
	Pools []EarningsHistoryItemPool `json:"pools"`

	// Float, the price of Rune based on the deepest USD pool at the end of the interval.
	RunePriceUSD string `json:"runePriceUSD"`

	// Int64, The beginning time of interval in unix timestamp
	StartTime string `json:"startTime"`
}

EarningsHistoryItem defines model for EarningsHistoryItem.

type EarningsHistoryItemPool

type EarningsHistoryItemPool struct {

	// Int64(e8), liquidity fees collected in the pool's asset
	AssetLiquidityFees string `json:"assetLiquidityFees"`

	// Int64(e8), total earnings in RUNE (totalLiquidityFees + rewards)
	Earnings string `json:"earnings"`

	// asset for the given pool
	Pool string `json:"pool"`

	// Int64(e8), RUNE amount sent to (positive) or taken from (negative) the pool as
	// a result of balancing it's share of system income each block
	Rewards string `json:"rewards"`

	// Int64(e8), liquidity fees collected in RUNE
	RuneLiquidityFees string `json:"runeLiquidityFees"`

	// Int64(e8), total saver reward collected by the pool, shown in pool's ASSET
	SaverEarning string `json:"saverEarning"`

	// Int64(e8), total liquidity fees (assetFees + runeFees) collected, shown in RUNE
	TotalLiquidityFeesRune string `json:"totalLiquidityFeesRune"`
}

pool earnings data during the time interval

type EarningsHistoryResponse

type EarningsHistoryResponse EarningsHistory

EarningsHistoryResponse defines model for EarningsHistoryResponse.

type GenesisInf

type GenesisInf struct {

	// Genesis Block hash
	Hash string `json:"hash"`

	// Genesis Block height
	Height int `json:"height"`
}

GenesisInf defines model for GenesisInf.

type GetActionsParams

type GetActionsParams struct {

	// Comma separated list. Address of sender or recipient of any in/out transaction related
	// to the action.
	Address *string `json:"address,omitempty"`

	// ID of any in/out tx related to the action
	Txid *string `json:"txid,omitempty"`

	// Comma separated list. Any asset that is part of the action (CHAIN.SYMBOL)
	// Additionally, synth, nosynth, and norune filters can be used for swap, add/withdraw actions.
	Asset *string `json:"asset,omitempty"`

	// One or more comma separated unique types of action
	// (swap, addLiquidity, withdraw, donate, refund, switch)
	Type *string `json:"type,omitempty"`

	// One or more comma separated transaction type of the action, it's the tx type parsed
	// from memo. For example: Loan is a swap event but it's considered as loan tx type
	// Type of Transactions:
	// "unknown", "add", "withdraw", "swap", "limitOrder", "outbound", "donate",
	// "bond", "unbond", "leave", "yggdrasilFund", "yggdrasilReturn", "reserve",
	// "refund", "migrate", "ragnarok", "switch", "noOp", "consolidate", "thorname",
	// "loanOpen", "loanRepayment"
	TxType *string `json:"txType,omitempty"`

	// Comma separated list. Affiliate address of the action (swap, refund)
	Affiliate *string `json:"affiliate,omitempty"`

	// number of actions returned, default is 50
	Limit *int64 `json:"limit,omitempty"`

	// pagination offset, default is 0
	Offset *int64 `json:"offset,omitempty"`

	// if this is given, the actions for the next page will be given
	NextPageToken *int64 `json:"nextPageToken,omitempty"`

	// if this is given, the actions older than the timestamp will be given
	Timestamp *int64 `json:"timestamp,omitempty"`

	// if this is given, the actions older than the height will be given
	Height *int64 `json:"height,omitempty"`

	// if this is given, the actions for the previous page will be given
	PrevPageToken *int64 `json:"prevPageToken,omitempty"`

	// if this is given, the actions newer than the timestamp will be given
	FromTimestamp *int64 `json:"fromTimestamp,omitempty"`

	// if this is given, the actions newer than the height will be given
	FromHeight *int64 `json:"fromHeight,omitempty"`
}

GetActionsParams defines parameters for GetActions.

type GetBalanceParams

type GetBalanceParams struct {

	// Unix timestamp as seconds since 1970 (if provided, height must not be provided)
	Timestamp *int64 `json:"timestamp,omitempty"`

	// Block height (if provided, timestamp must not be provided)
	Height *int64 `json:"height,omitempty"`
}

GetBalanceParams defines parameters for GetBalance.

type GetBorrowersAddressesParams

type GetBorrowersAddressesParams struct {

	// Return only borrowers getting loan against this asset as collateral.
	Asset *string `json:"asset,omitempty"`
}

GetBorrowersAddressesParams defines parameters for GetBorrowersAddresses.

type GetDepthHistoryParams

type GetDepthHistoryParams struct {

	// Interval of calculations
	Interval *GetDepthHistoryParamsInterval `json:"interval,omitempty"`

	// Number of intervals to return. Should be between [1..400].
	Count *int `json:"count,omitempty"`

	// End time of the query as unix timestamp. If only count is given, defaults to now.
	To *int64 `json:"to,omitempty"`

	// Start time of the query as unix timestamp
	From *int64 `json:"from,omitempty"`
}

GetDepthHistoryParams defines parameters for GetDepthHistory.

type GetDepthHistoryParamsInterval

type GetDepthHistoryParamsInterval string

GetDepthHistoryParamsInterval defines parameters for GetDepthHistory.

type GetEarningsHistoryParams

type GetEarningsHistoryParams struct {

	// Interval of calculations
	Interval *GetEarningsHistoryParamsInterval `json:"interval,omitempty"`

	// Number of intervals to return. Should be between [1..400].
	Count *int `json:"count,omitempty"`

	// End time of the query as unix timestamp. If only count is given, defaults to now.
	To *int64 `json:"to,omitempty"`

	// Start time of the query as unix timestamp
	From *int64 `json:"from,omitempty"`
}

GetEarningsHistoryParams defines parameters for GetEarningsHistory.

type GetEarningsHistoryParamsInterval

type GetEarningsHistoryParamsInterval string

GetEarningsHistoryParamsInterval defines parameters for GetEarningsHistory.

type GetLiquidityHistoryParams

type GetLiquidityHistoryParams struct {

	// Return stats for given pool. Returns sum of all pools if missing
	Pool *string `json:"pool,omitempty"`

	// Interval of calculations
	Interval *GetLiquidityHistoryParamsInterval `json:"interval,omitempty"`

	// Number of intervals to return. Should be between [1..400]
	Count *int `json:"count,omitempty"`

	// End time of the query as unix timestamp. If only count is given, defaults to now
	To *int64 `json:"to,omitempty"`

	// Start time of the query as unix timestamp
	From *int64 `json:"from,omitempty"`
}

GetLiquidityHistoryParams defines parameters for GetLiquidityHistory.

type GetLiquidityHistoryParamsInterval

type GetLiquidityHistoryParamsInterval string

GetLiquidityHistoryParamsInterval defines parameters for GetLiquidityHistory.

type GetMemberDetailParams

type GetMemberDetailParams struct {

	// A flag to show saver vault membership details, the default is false.
	ShowSavers *bool `json:"showSavers,omitempty"`
}

GetMemberDetailParams defines parameters for GetMemberDetail.

type GetMembersAdressesParams

type GetMembersAdressesParams struct {

	// Return only members present in the pool.
	Pool *string `json:"pool,omitempty"`
}

GetMembersAdressesParams defines parameters for GetMembersAdresses.

type GetPoolParams

type GetPoolParams struct {

	// Specifies the base interval from which APY is extrapolated.
	// Default is 14d.
	Period *GetPoolParamsPeriod `json:"period,omitempty"`
}

GetPoolParams defines parameters for GetPool.

type GetPoolParamsPeriod

type GetPoolParamsPeriod string

GetPoolParamsPeriod defines parameters for GetPool.

type GetPoolStatsParams

type GetPoolStatsParams struct {

	// Restricts aggregation type fields to the last period only.
	// Default is 14d.
	Period *GetPoolStatsParamsPeriod `json:"period,omitempty"`
}

GetPoolStatsParams defines parameters for GetPoolStats.

type GetPoolStatsParamsPeriod

type GetPoolStatsParamsPeriod string

GetPoolStatsParamsPeriod defines parameters for GetPoolStats.

type GetPoolsParams

type GetPoolsParams struct {

	// Filter for only pools with this status
	Status *GetPoolsParamsStatus `json:"status,omitempty"`

	// Specifies the base interval from which annualPercentageRate and poolAPY is extrapolated.
	// Default is 14d.
	Period *GetPoolsParamsPeriod `json:"period,omitempty"`
}

GetPoolsParams defines parameters for GetPools.

type GetPoolsParamsPeriod

type GetPoolsParamsPeriod string

GetPoolsParamsPeriod defines parameters for GetPools.

type GetPoolsParamsStatus

type GetPoolsParamsStatus string

GetPoolsParamsStatus defines parameters for GetPools.

type GetSaversHistoryParams

type GetSaversHistoryParams struct {

	// Interval of calculations
	Interval *GetSaversHistoryParamsInterval `json:"interval,omitempty"`

	// Number of intervals to return. Should be between [1..400].
	Count *int `json:"count,omitempty"`

	// End time of the query as unix timestamp. If only count is given, defaults to now.
	To *int64 `json:"to,omitempty"`

	// Start time of the query as unix timestamp
	From *int64 `json:"from,omitempty"`
}

GetSaversHistoryParams defines parameters for GetSaversHistory.

type GetSaversHistoryParamsInterval

type GetSaversHistoryParamsInterval string

GetSaversHistoryParamsInterval defines parameters for GetSaversHistory.

type GetSwapHistoryParams

type GetSwapHistoryParams struct {

	// Return history given pool. Returns sum of all pools if missing.
	Pool *string `json:"pool,omitempty"`

	// Interval of calculations
	Interval *GetSwapHistoryParamsInterval `json:"interval,omitempty"`

	// Number of intervals to return. Should be between [1..400].
	Count *int `json:"count,omitempty"`

	// End time of the query as unix timestamp. If only count is given, defaults to now.
	To *int64 `json:"to,omitempty"`

	// Start time of the query as unix timestamp
	From *int64 `json:"from,omitempty"`
}

GetSwapHistoryParams defines parameters for GetSwapHistory.

type GetSwapHistoryParamsInterval

type GetSwapHistoryParamsInterval string

GetSwapHistoryParamsInterval defines parameters for GetSwapHistory.

type GetTVLHistoryParams

type GetTVLHistoryParams struct {

	// Interval of calculations
	Interval *GetTVLHistoryParamsInterval `json:"interval,omitempty"`

	// Number of intervals to return. Should be between [1..400].
	Count *int `json:"count,omitempty"`

	// End time of the query as unix timestamp. If only count is given, defaults to now.
	To *int64 `json:"to,omitempty"`

	// Start time of the query as unix timestamp
	From *int64 `json:"from,omitempty"`
}

GetTVLHistoryParams defines parameters for GetTVLHistory.

type GetTVLHistoryParamsInterval

type GetTVLHistoryParamsInterval string

GetTVLHistoryParamsInterval defines parameters for GetTVLHistory.

type Health

type Health struct {

	// True means healthy, connected to database
	Database    bool        `json:"database"`
	GenesisInfo *GenesisInf `json:"genesisInfo,omitempty"`

	// True means healthy. False means Midgard is still catching up to the chain
	InSync         bool     `json:"inSync"`
	LastAggregated HeightTS `json:"lastAggregated"`
	LastCommitted  HeightTS `json:"lastCommitted"`
	LastFetched    HeightTS `json:"lastFetched"`
	LastThorNode   HeightTS `json:"lastThorNode"`

	// Int64, the current block count
	ScannerHeight string `json:"scannerHeight"`
}

Health defines model for Health.

type HealthResponse

type HealthResponse Health

HealthResponse defines model for HealthResponse.

type HeightTS

type HeightTS struct {

	// Block height
	Height int `json:"height"`

	// Block timestamp (seconds since epoch)
	Timestamp int `json:"timestamp"`
}

HeightTS defines model for HeightTS.

type KnownPools

type KnownPools struct {
	AdditionalProperties map[string]string `json:"-"`
}

KnownPools defines model for KnownPools.

func (KnownPools) Get

func (a KnownPools) Get(fieldName string) (value string, found bool)

Getter for additional properties for KnownPools. Returns the specified element and whether it was found

func (KnownPools) MarshalJSON

func (a KnownPools) MarshalJSON() ([]byte, error)

Override default JSON handling for KnownPools to handle AdditionalProperties

func (*KnownPools) Set

func (a *KnownPools) Set(fieldName string, value string)

Setter for additional properties for KnownPools

func (*KnownPools) UnmarshalJSON

func (a *KnownPools) UnmarshalJSON(b []byte) error

Override default JSON handling for KnownPools to handle AdditionalProperties

type KnownPoolsResponse

type KnownPoolsResponse KnownPools

KnownPoolsResponse defines model for KnownPoolsResponse.

type LiquidityHistory

type LiquidityHistory struct {
	Intervals LiquidityHistoryIntervals `json:"intervals"`
	Meta      LiquidityHistoryItem      `json:"meta"`
}

LiquidityHistory defines model for LiquidityHistory.

type LiquidityHistoryIntervals

type LiquidityHistoryIntervals []LiquidityHistoryItem

LiquidityHistoryIntervals defines model for LiquidityHistoryIntervals.

type LiquidityHistoryItem

type LiquidityHistoryItem struct {

	// Int64(e8), total assets deposited during the time interval.
	// Denoted in Rune using the price at deposit time.
	AddAssetLiquidityVolume string `json:"addAssetLiquidityVolume"`

	// Int64, number of deposits during the time interval.
	AddLiquidityCount string `json:"addLiquidityCount"`

	// Int64(e8), total of rune and asset deposits.
	// Denoted in Rune (using the price at deposit time).
	AddLiquidityVolume string `json:"addLiquidityVolume"`

	// Int64(e8), total Rune deposited during the time interval.
	AddRuneLiquidityVolume string `json:"addRuneLiquidityVolume"`

	// Int64, The end time of bucket in unix timestamp
	EndTime string `json:"endTime"`

	// Int64(e8), net liquidity changes (withdrawals - deposits) during the time interval
	Net string `json:"net"`

	// Float, the price of Rune based on the deepest USD pool at the end of the interval.
	RunePriceUSD string `json:"runePriceUSD"`

	// Int64, The beginning time of bucket in unix timestamp
	StartTime string `json:"startTime"`

	// Int64(e8), total assets withdrawn during the time interval.
	// Denoted in Rune using the price at withdraw time.
	WithdrawAssetVolume string `json:"withdrawAssetVolume"`

	// Int64, number of withdraw during the time interval.
	WithdrawCount string `json:"withdrawCount"`

	// Int64(e8), total Rune withdrawn during the time interval.
	WithdrawRuneVolume string `json:"withdrawRuneVolume"`

	// Int64(e8), total of rune and asset withdrawals.
	// Denoted in Rune (using the price at withdraw time).
	WithdrawVolume string `json:"withdrawVolume"`
}

LiquidityHistoryItem defines model for LiquidityHistoryItem.

type LiquidityHistoryResponse

type LiquidityHistoryResponse LiquidityHistory

LiquidityHistoryResponse defines model for LiquidityHistoryResponse.

type MemberDetails

type MemberDetails struct {

	// List details of all the liquidity providers identified with the given address
	Pools []MemberPool `json:"pools"`
}

MemberDetails defines model for MemberDetails.

type MemberDetailsResponse

type MemberDetailsResponse MemberDetails

MemberDetailsResponse defines model for MemberDetailsResponse.

type MemberPool

type MemberPool struct {

	// Int64(e8), total asset added to the pool by member
	AssetAdded string `json:"assetAdded"`

	// asset address used by the member
	AssetAddress string `json:"assetAddress"`

	// Int64(e8), total asset that is currently deposited to the pool by member.
	// This field is same as the `asset_deposit_value` field in thornode. Mainly can be used
	// for tracking, mainly Growth Percentage
	AssetDeposit string `json:"assetDeposit"`

	// Int64(e8), asset sent but not added yet, it will be added when the rune pair arrives
	AssetPending string `json:"assetPending"`

	// Int64(e8), total asset withdrawn from the pool by member
	AssetWithdrawn string `json:"assetWithdrawn"`

	// Int64, Unix timestamp for the first time member deposited into the pool
	DateFirstAdded string `json:"dateFirstAdded"`

	// Int64, Unix timestamp for the last time member deposited into the pool
	DateLastAdded string `json:"dateLastAdded"`

	// Int64, pool liquidity units that belong the the member
	LiquidityUnits string `json:"liquidityUnits"`

	// Pool rest of the data refers to
	Pool string `json:"pool"`

	// Int64(e8), total Rune added to the pool by member
	RuneAdded string `json:"runeAdded"`

	// Rune address used by the member
	RuneAddress string `json:"runeAddress"`

	// Int64(e8), total Rune that is currently deposited to the pool by member.
	// This field is same as the `rune_deposit_value` field in thornode. Mainly can be used
	// for tracking, mainly Growth Percentage
	RuneDeposit string `json:"runeDeposit"`

	// Int64(e8), Rune sent but not added yet, it will be added when the asset pair arrives
	RunePending string `json:"runePending"`

	// Int64(e8), total Rune withdrawn from the pool by member
	RuneWithdrawn string `json:"runeWithdrawn"`
}

MemberPool defines model for MemberPool.

type Members

type Members []string

Members defines model for Members.

type MembersResponse

type MembersResponse Members

MembersResponse defines model for MembersResponse.

type Metadata

type Metadata struct {
	AddLiquidity *AddLiquidityMetadata `json:"addLiquidity,omitempty"`
	Refund       *RefundMetadata       `json:"refund,omitempty"`
	Swap         *SwapMetadata         `json:"swap,omitempty"`
	Withdraw     *WithdrawMetadata     `json:"withdraw,omitempty"`
}

Metadata defines model for Metadata.

type Network

type Network struct {

	// Array of rune amounts (e8) bonded by each active node.
	ActiveBonds []string `json:"activeBonds"`

	// Int64, Number of active nodes
	ActiveNodeCount string       `json:"activeNodeCount"`
	BlockRewards    BlockRewards `json:"blockRewards"`
	BondMetrics     BondMetrics  `json:"bondMetrics"`

	// Float, E.g. 0.01 = 1%. Estimate of the compounded bonding earnings based on the current
	// reserve size, emmission curve, blocks per year and pool share factor =
	// (WeeklyBondIncome/BondAmount + 1)^52 - 1
	BondingAPY string `json:"bondingAPY"`

	// Float, E.g. 0.01 = 1%. Estimate of the compounded  liquidity provider earnings based
	// on the current reserve size, emmission curve, blocks per year and pool share factor =
	// (WeeklyLiquidityIncome/(totalPooledRune*2) + 1)^52 - 1
	LiquidityAPY string `json:"liquidityAPY"`

	// Int64, height (block number) of the next churn.
	NextChurnHeight string `json:"nextChurnHeight"`

	// Int64, the remaining time of pool activation (in blocks)
	PoolActivationCountdown string `json:"poolActivationCountdown"`

	// Float [0..1], the ratio which is used to split earnings between liquidity provider and
	// nodes.
	// LPIncome = rewards * poolShareFactor ;
	// BondIncome :=  rewards * (1 - poolShareFactor)
	PoolShareFactor string `json:"poolShareFactor"`

	// Array of rune amounts (e8) bonded by each standby node.
	StandbyBonds []string `json:"standbyBonds"`

	// Int64, Number of standby nodes, some of them might become active at the next churn.
	StandbyNodeCount string `json:"standbyNodeCount"`

	// Int64(e8), total Rune in all pools. Because asset and Rune value is the same amount in
	// every pool (by definition), the total amount pooled is totalPooledRune*2.
	TotalPooledRune string `json:"totalPooledRune"`

	// Int64(e8), Current size of the Reserve.
	TotalReserve string `json:"totalReserve"`
}

Network defines model for Network.

type NetworkFees

type NetworkFees []Coin

List of network fees associated to an action. One network fee is charged for each outbound transaction

type NetworkResponse

type NetworkResponse Network

NetworkResponse defines model for NetworkResponse.

type Node

type Node struct {

	// ed25519 public key
	Ed25519 string `json:"ed25519"`

	// node thorchain address
	NodeAddress string `json:"nodeAddress"`

	// secp256k1 public key
	Secp256k1 string `json:"secp256k1"`
}

Node defines model for Node.

type Nodes

type Nodes []Node

Nodes defines model for Nodes.

type NodesResponse

type NodesResponse Nodes

NodesResponse defines model for NodesResponse.

type PoolDetail

type PoolDetail struct {

	// Float, Annual Percentage Yield of earning to depth (earning/depth) estimated from a period
	// (configurable by the period parameter, default is 14) E.g. 0.1 means 10% yearly return.
	AnnualPercentageRate string `json:"annualPercentageRate"`
	Asset                string `json:"asset"`

	// Int64(e8), the amount of Asset in the pool.
	AssetDepth string `json:"assetDepth"`

	// Float, price of asset in rune. I.e. rune amount / asset amount.
	AssetPrice string `json:"assetPrice"`

	// Float, the price of asset in USD (based on the deepest USD pool).
	AssetPriceUSD string `json:"assetPriceUSD"`

	// Int64(e8), The earning that has been recorded from the pool asset's Liquidity Fees
	// and Rewards in RUNE. The earnings shown are from the period parameter default being 14 days
	// (configurable by the period parameter).
	Earnings string `json:"earnings"`

	// Float, The estimation of earnings during the time interval expanded through a year
	// compared to the current pool depth.
	// E.g. 0.1 means the pool based on this interval earnings can earn 10% of its pool during a year.
	EarningsAnnualAsPercentOfDepth string `json:"earningsAnnualAsPercentOfDepth"`

	// Int64, Liquidity Units in the pool.
	LiquidityUnits string `json:"liquidityUnits"`

	// Float, Annual yield estimated (compounding) from a period (default being 14d)
	// configurable by the period parameter. Calculated from Liquidity Unit Value Index (LUVI).
	// Due to Impermanent Loss and Synths Leverage this might be negative.
	LpLuvi string `json:"lpLuvi"`

	// Int64, The native decimal number of the pool asset. (If the value is "-1", it means midgard doesn't know the pool native decimal)
	NativeDecimal string `json:"nativeDecimal"`

	// Float, Annual Percentage Yield of earning to depth (earning/depth) estimated from a period
	// (configurable by the period parameter, default is 14) E.g. 0.1 means 10% yearly return.
	PoolAPY string `json:"poolAPY"`

	// Int64(e8), the amount of Rune in the pool.
	RuneDepth string `json:"runeDepth"`

	// Float, Annual Return estimated linearly (not compounded) for savers from
	// a period of typically the last 30 or 100 days (configurable by the period parameter,
	// default is 14). E.g. 0.1 means 10% yearly return.
	// If the savers period has not yet been reached, It will show zero instead.
	SaversAPR string `json:"saversAPR"`

	// Int64, Total synth locked in saver vault.
	SaversDepth string `json:"saversDepth"`

	// Int64, Units tracking savers vault ownership.
	SaversUnits string `json:"saversUnits"`

	// The state of the pool, e.g. Available, Staged.
	Status string `json:"status"`

	// Int64, Synth supply in the pool.
	SynthSupply string `json:"synthSupply"`

	// Int64, Synth Units in the pool.
	SynthUnits string `json:"synthUnits"`

	// Int64, Total collateral of the pool created by the borrowers.
	TotalCollateral string `json:"totalCollateral"`

	// Int64, Total debt of the pool by the borrowers.
	TotalDebtTor string `json:"totalDebtTor"`

	// Int64, Total Units (synthUnits + liquidityUnits) in the pool.
	Units string `json:"units"`

	// Int64(e8), the total volume of swaps in the last 24h to and from Rune denoted in Rune.
	// It includes synth mint or burn.
	Volume24h string `json:"volume24h"`
}

PoolDetail defines model for PoolDetail.

type PoolDetails

type PoolDetails []PoolDetail

PoolDetails defines model for PoolDetails.

type PoolResponse

type PoolResponse PoolDetail

PoolResponse defines model for PoolResponse.

type PoolStatsDetail

type PoolStatsDetail struct {

	// Int64(e8), same as history/liquidity_changes:addAssetLiquidityVolume
	AddAssetLiquidityVolume string `json:"addAssetLiquidityVolume"`

	// Int64, same as history/liquidity_changes:addLiquidityCount
	AddLiquidityCount string `json:"addLiquidityCount"`

	// Int64(e8), same as history/liquidity_changes:addLiquidityVolume
	AddLiquidityVolume string `json:"addLiquidityVolume"`

	// Int64(e8), same as history/liquidity_changes:addRuneLiquidityVolume
	AddRuneLiquidityVolume string `json:"addRuneLiquidityVolume"`

	// deprecated now it's only showing zero util being deleted.
	AnnualPercentageRate string `json:"annualPercentageRate"`
	Asset                string `json:"asset"`

	// Int64(e8), the amount of Asset in the pool
	AssetDepth string `json:"assetDepth"`

	// Float, price of asset in rune. I.e. rune amount / asset amount
	AssetPrice string `json:"assetPrice"`

	// Float, the price of asset in USD (based on the deepest USD pool).
	AssetPriceUSD string `json:"assetPriceUSD"`

	// Float64 (Basis points, 0-10000, where 10000=100%), same as history/swaps:averageSlip
	AverageSlip string `json:"averageSlip"`

	// Int64(e8), The earning that has been recorded from the pool asset's Liquidity Fees
	// and Rewards in RUNE. The earnings shown are from the period parameter default being 14 days
	// (configurable by the period parameter).
	Earnings string `json:"earnings"`

	// Float, The estimation of earnings during the time interval expanded through a year
	// compared to the current pool depth.
	// E.g. 0.1 means the pool based on this interval earnings can earn 10% of its pool during a year.
	EarningsAnnualAsPercentOfDepth string `json:"earningsAnnualAsPercentOfDepth"`

	// Int64, Liquidity Units in the pool
	LiquidityUnits string `json:"liquidityUnits"`

	// deprecated now it's only showing zero util being deleted.
	PoolAPY string `json:"poolAPY"`

	// Int64(e8), the amount of Rune in the pool
	RuneDepth string `json:"runeDepth"`

	// Float, Annual Return estimated linearly (not compounded) for savers from
	// a period of typically the last 30 or 100 days (configurable by the period parameter,
	// default is 14). E.g. 0.1 means 10% yearly return.
	// If the savers period has not yet been reached, It will show zero instead.
	SaversAPR string `json:"saversAPR"`

	// The state of the pool, e.g. Available, Staged
	Status string `json:"status"`

	// Int64, same as history/swaps:totalCount
	SwapCount string `json:"swapCount"`

	// Int64(e8), same as history/swaps:totalVolume
	SwapVolume string `json:"swapVolume"`

	// Int64, Synth supply in the pool
	SynthSupply string `json:"synthSupply"`

	// Int64, Synth Units in the pool
	SynthUnits string `json:"synthUnits"`

	// Float64 (Basis points, 0-10000, where 10000=100%), same as
	// history/swaps:toAssetAverageSlip
	ToAssetAverageSlip string `json:"toAssetAverageSlip"`

	// Int64, same as history/swaps:toAssetCount
	ToAssetCount string `json:"toAssetCount"`

	// Int64(e8), same as history/swaps:toAssetFees
	ToAssetFees string `json:"toAssetFees"`

	// Int64(e8), same as history/swaps:toAssetVolume
	ToAssetVolume string `json:"toAssetVolume"`

	// Float64 (Basis points, 0-10000, where 10000=100%), same as
	// history/swaps:toRuneAverageSlip
	ToRuneAverageSlip string `json:"toRuneAverageSlip"`

	// Int64, same as history/swaps:toRuneCount
	ToRuneCount string `json:"toRuneCount"`

	// Int64(e8), same as history/swaps:toRuneFees
	ToRuneFees string `json:"toRuneFees"`

	// Int64(e8), same as history/swaps:toRuneVolume
	ToRuneVolume string `json:"toRuneVolume"`

	// Int64(e8), same as history/swaps:totalFees
	TotalFees string `json:"totalFees"`

	// Int64, same as len(history/members?pool=POOL)
	UniqueMemberCount string `json:"uniqueMemberCount"`

	// Deprecated, it's always 0.
	UniqueSwapperCount string `json:"uniqueSwapperCount"`

	// Int64, Total Units (synthUnits + liquidityUnits) in the pool
	Units string `json:"units"`

	// Int64(e8), same as history/liquidity_changes:withdrawAssetVolume
	WithdrawAssetVolume string `json:"withdrawAssetVolume"`

	// Int64, same as history/liquidity_changes:withdrawCount
	WithdrawCount string `json:"withdrawCount"`

	// Int64(e8), same as history/liquidity_changes:withdrawRuneVolume
	WithdrawRuneVolume string `json:"withdrawRuneVolume"`

	// Int64(e8), same as history/liquidity_changes:withdrawVolume
	WithdrawVolume string `json:"withdrawVolume"`
}

PoolStatsDetail defines model for PoolStatsDetail.

type PoolStatsResponse

type PoolStatsResponse PoolStatsDetail

PoolStatsResponse defines model for PoolStatsResponse.

type PoolsResponse

type PoolsResponse PoolDetails

PoolsResponse defines model for PoolsResponse.

type RefundMetadata

type RefundMetadata struct {

	// Affiliate fee address of the swap, empty if fee swap
	AffiliateAddress string `json:"affiliateAddress"`

	// Int64 (Basis points, 0-1000, where 1000=10%)
	AffiliateFee string `json:"affiliateFee"`

	// Transaction memo of the refund action
	Memo string `json:"memo"`

	// List of network fees associated to an action. One network fee is charged for each
	// outbound transaction
	NetworkFees NetworkFees `json:"networkFees"`

	// Reason for the refund
	Reason string `json:"reason"`

	// The type of the transaction given from its Memo
	// Type of Transaction type:
	// "unknown", "add", "withdraw", "swap", "limitOrder", "outbound", "donate",
	// "bond", "unbond", "leave", "yggdrasilFund", "yggdrasilReturn", "reserve",
	// "refund", "migrate", "ragnarok", "switch", "noOp", "consolidate", "thorname",
	// "loanOpen", "loanRepayment"
	TxType string `json:"txType"`
}

RefundMetadata defines model for RefundMetadata.

type ReverseTHORNameResponse

type ReverseTHORNameResponse ReverseTHORNames

ReverseTHORNameResponse defines model for ReverseTHORNameResponse.

type ReverseTHORNames

type ReverseTHORNames []string

ReverseTHORNames defines model for ReverseTHORNames.

type SaverDetails

type SaverDetails struct {

	// List details of all the savers identified with the given address
	Pools []SaverPool `json:"pools"`
}

SaverDetails defines model for SaverDetails.

type SaverDetailsResponse

type SaverDetailsResponse SaverDetails

SaverDetailsResponse defines model for SaverDetailsResponse.

type SaverPool

type SaverPool struct {

	// Int64(e8), total asset added in the saver pool by member
	AssetAdded string `json:"assetAdded"`

	// saver address used by the member
	AssetAddress string `json:"assetAddress"`

	// Int64(e8), total asset that is currently deposited by the member
	AssetDeposit string `json:"assetDeposit"`

	// Int64(e8), total asset can be redeemed from the saver pool by member
	AssetRedeem string `json:"assetRedeem"`

	// Int64(e8), total asset withdrawn from the saver pool by member
	AssetWithdrawn string `json:"assetWithdrawn"`

	// Int64, Unix timestamp for the first time member deposited into the saver pool
	DateFirstAdded string `json:"dateFirstAdded"`

	// Int64, Unix timestamp for the last time member deposited into the saver pool
	DateLastAdded string `json:"dateLastAdded"`

	// The Pool rest of the data are refering to (only those pools can show up which have a corresponding saver pool)
	Pool string `json:"pool"`

	// Int64, saver liquidity units that belong the the member
	SaverUnits string `json:"saverUnits"`
}

SaverPool defines model for SaverPool.

type SaversHistory

type SaversHistory struct {
	Intervals SaversHistoryIntervals `json:"intervals"`
	Meta      SaversHistoryMeta      `json:"meta"`
}

SaversHistory defines model for SaversHistory.

type SaversHistoryIntervals

type SaversHistoryIntervals []SaversHistoryItem

SaversHistoryIntervals defines model for SaversHistoryIntervals.

type SaversHistoryItem

type SaversHistoryItem struct {

	// Int64, The end time of bucket in unix timestamp
	EndTime string `json:"endTime"`

	// Int64, Number of saver members in the pool at the end of the interval
	SaversCount string `json:"saversCount"`

	// Int64(e8), The depth in the savers vault at the end of the interval
	SaversDepth string `json:"saversDepth"`

	// Int64, Savers Units in the saver vault at the end of the interval
	SaversUnits string `json:"saversUnits"`

	// Int64, The beginning time of bucket in unix timestamp
	StartTime string `json:"startTime"`
}

SaversHistoryItem defines model for SaversHistoryItem.

type SaversHistoryMeta

type SaversHistoryMeta struct {

	// Int64, Number of savers member in the savers vault at the end of the interval at time endTime
	EndSaversCount string `json:"endSaversCount"`

	// Int64(e8), The depth in the savers vault at the end of the interval at time
	// endTime
	EndSaversDepth string `json:"endSaversDepth"`

	// Int64, The end time of bucket in unix timestamp
	EndTime string `json:"endTime"`

	// Int64, Savers Units in the savers vault at the end of the interval at time endTime
	EndUnits string `json:"endUnits"`

	// Int64, Number of savers member in the savers vault at the start of the interval at time startTime
	StartSaversCount string `json:"startSaversCount"`

	// Int64(e8), The depth in savers vault at the start of the interval at time
	// startTime
	StartSaversDepth string `json:"startSaversDepth"`

	// Int64, The beginning time of bucket in unix timestamp
	StartTime string `json:"startTime"`

	// Int64, Savers Units in the savers vault at the start of the interval at time startTime
	StartUnits string `json:"startUnits"`
}

SaversHistoryMeta defines model for SaversHistoryMeta.

type SaversHistoryResponse

type SaversHistoryResponse SaversHistory

SaversHistoryResponse defines model for SaversHistoryResponse.

type StatsData

type StatsData struct {

	// Int64, number of deposits since beginning.
	AddLiquidityCount string `json:"addLiquidityCount"`

	// Int64(e8), total of deposits since beginning.
	AddLiquidityVolume string `json:"addLiquidityVolume"`

	// Deprecated, it's always 0.
	DailyActiveUsers string `json:"dailyActiveUsers"`

	// Deprecated, it's always 0.
	MonthlyActiveUsers string `json:"monthlyActiveUsers"`

	// Int64(e8), current total Rune in the pools.
	RuneDepth string `json:"runeDepth"`

	// Float, the price of Rune based on the deepest USD pool.
	RunePriceUSD string `json:"runePriceUSD"`

	// Int64, number of swaps (including synths) since beginning.
	SwapCount string `json:"swapCount"`

	// Int64(e8), number of swaps (including synths) in the last 24h.
	SwapCount24h string `json:"swapCount24h"`

	// Int64, number of swaps (including synths) in the last 30d.
	SwapCount30d string `json:"swapCount30d"`

	// Int64(e8), total volume of swaps (including synths) denoted in Rune since beginning.
	SwapVolume string `json:"swapVolume"`

	// Int64(e8), amount of native rune switched from erc20 or bep2 rune.
	SwitchedRune string `json:"switchedRune"`

	// Int64, number of swaps from Synth to Rune since beginning.
	SynthBurnCount string `json:"synthBurnCount"`

	// Int64, number of swaps from Rune to Synth since beginning.
	SynthMintCount string `json:"synthMintCount"`

	// Int64, number of swaps from Rune to Asset since beginning.
	ToAssetCount string `json:"toAssetCount"`

	// Int64, number of swaps from Asset to Rune since beginning.
	ToRuneCount string `json:"toRuneCount"`

	// Deprecated, it's always 0.
	UniqueSwapperCount string `json:"uniqueSwapperCount"`

	// Int64, number of withdraws since beginning.
	WithdrawCount string `json:"withdrawCount"`

	// Int64(e8), total of withdraws since beginning.
	WithdrawVolume string `json:"withdrawVolume"`
}

StatsData defines model for StatsData.

type StatsResponse

type StatsResponse StatsData

StatsResponse defines model for StatsResponse.

type StreamingSwapMeta

type StreamingSwapMeta struct {

	// Int64, Number of swaps events which already happened.
	Count string `json:"count"`

	// Represents a digital currency amount
	DepositedCoin Coin `json:"depositedCoin"`

	// Array of failed swaps reasons in streaming swap.
	FailedSwapReasons *[]string `json:"failedSwapReasons,omitempty"`

	// Array of failed swaps index in streaming swap.
	FailedSwaps *[]string `json:"failedSwaps,omitempty"`

	// Represents a digital currency amount
	InCoin Coin `json:"inCoin"`

	// Int64, Number of blocks between swpas. (Blocks/Swap) E.g. 1 means every block.
	Interval string `json:"interval"`

	// Int64, The last blockheight the final swap happend (not outbound). This field will be missing until the final swap happens.
	LastHeight string `json:"lastHeight"`

	// Represents a digital currency amount
	OutCoin Coin `json:"outCoin"`

	// Int64,  Number of swaps which thorchain is planning to execute. Total count at the end might be less.
	Quantity string `json:"quantity"`
}

Streaming Metadata associated with the action if it was streaming swap

type SwapHistory

type SwapHistory struct {
	Intervals SwapHistoryIntervals `json:"intervals"`
	Meta      SwapHistoryItem      `json:"meta"`
}

SwapHistory defines model for SwapHistory.

type SwapHistoryIntervals

type SwapHistoryIntervals []SwapHistoryItem

SwapHistoryIntervals defines model for SwapHistoryIntervals.

type SwapHistoryItem

type SwapHistoryItem struct {

	// Float64 (Basis points, 0-10000, where 10000=100%), the weighted average (by count)
	// of toAssetAverageSlip, toRuneAverageSlip, synthMintAverageSlip, synthRedeemAverageSlip.
	// Big swaps have the same weight as small swaps.
	AverageSlip string `json:"averageSlip"`

	// Int64, The end time of bucket in unix timestamp
	EndTime string `json:"endTime"`

	// Float, the price of Rune based on the deepest USD pool at the end of the interval.
	RunePriceUSD string `json:"runePriceUSD"`

	// Int64, The beginning time of bucket in unix timestamp
	StartTime string `json:"startTime"`

	// Float64 (Basis points, 0-10000, where 10000=100%), the average slip for swaps
	// from rune to synthetic asset.
	// Big swaps have the same weight as small swaps
	SynthMintAverageSlip string `json:"synthMintAverageSlip"`

	// Int64, count of rune to synthetic asset swaps
	SynthMintCount string `json:"synthMintCount"`

	// Int64(e8), the fees collected from swaps from rune to synthetic asset (in rune)
	SynthMintFees string `json:"synthMintFees"`

	// Int64(e8), volume of swaps from rune to synthetic asset denoted in rune
	SynthMintVolume string `json:"synthMintVolume"`

	// Int64(e2), volume of swaps from rune to synthetic asset denoted in USD price of the rune in each swap
	SynthMintVolumeUSD string `json:"synthMintVolumeUSD"`

	// Float64 (Basis points, 0-10000, where 10000=100%), the average slip for swaps
	// from synthetic asset to rune.
	// Big swaps have the same weight as small swaps
	SynthRedeemAverageSlip string `json:"synthRedeemAverageSlip"`

	// Int64, count of synthetic asset to rune swaps
	SynthRedeemCount string `json:"synthRedeemCount"`

	// Int64(e8), the fees collected from swaps from synthetic asset to rune (in rune)
	SynthRedeemFees string `json:"synthRedeemFees"`

	// Int64(e8), volume of swaps from synthetic asset to rune denoted in rune
	SynthRedeemVolume string `json:"synthRedeemVolume"`

	// Int64(e2), volume of swaps from synthetic asset to rune denoted in USD price of the rune in each swap
	SynthRedeemVolumeUSD string `json:"synthRedeemVolumeUSD"`

	// Float64 (Basis points, 0-10000, where 10000=100%), the average slip for swaps
	// from rune to asset.
	// Big swaps have the same weight as small swaps
	ToAssetAverageSlip string `json:"toAssetAverageSlip"`

	// Int64, count of swaps from rune to asset
	ToAssetCount string `json:"toAssetCount"`

	// Int64(e8), the fees collected from swaps from rune to asset (in rune)
	ToAssetFees string `json:"toAssetFees"`

	// Int64(e8), volume of swaps from rune to asset denoted in rune
	ToAssetVolume string `json:"toAssetVolume"`

	// Int64(e2), volume of swaps from rune to asset denoted in USD price of the rune in each swap
	ToAssetVolumeUSD string `json:"toAssetVolumeUSD"`

	// Float64 (Basis points, 0-10000, where 10000=100%), the average slip for swaps
	// from asset to rune.
	// Big swaps have the same weight as small swaps
	ToRuneAverageSlip string `json:"toRuneAverageSlip"`

	// Int64, count of swaps from asset to rune
	ToRuneCount string `json:"toRuneCount"`

	// Int64(e8), the fees collected from swaps from asset to rune (in rune)
	ToRuneFees string `json:"toRuneFees"`

	// Int64(e8), volume of swaps from asset to rune denoted in rune
	ToRuneVolume string `json:"toRuneVolume"`

	// Int64(e2), volume of swaps from asset to rune denoted in USD price of the rune in each swap
	ToRuneVolumeUSD string `json:"toRuneVolumeUSD"`

	// Int64, toAssetCount + toRuneCount + synthMintCount + synthRedeemCount
	TotalCount string `json:"totalCount"`

	// Int64(e8), toAssetFees + toRuneFees + synthMintFees + synthRedeemFees
	TotalFees string `json:"totalFees"`

	// Int64(e8),
	// toAssetVolume + toRuneVolume + synthMintVolume + synthRedeemVolume (denoted in rune)
	TotalVolume string `json:"totalVolume"`

	// Int64(e2),
	// toAssetVolume + toRuneVolume + synthMintVolume + synthRedeemVolume (denoted in USD price of the rune in each swap)
	TotalVolumeUSD string `json:"totalVolumeUSD"`
}

SwapHistoryItem defines model for SwapHistoryItem.

type SwapHistoryResponse

type SwapHistoryResponse SwapHistory

SwapHistoryResponse defines model for SwapHistoryResponse.

type SwapMetadata

type SwapMetadata struct {

	// Affiliate fee address of the swap, empty if fee swap
	AffiliateAddress string `json:"affiliateAddress"`

	// Int64 (Basis points, 0-1000, where 1000=10%)
	AffiliateFee string `json:"affiliateFee"`

	// indicate whether this action was streaming
	IsStreamingSwap bool `json:"isStreamingSwap"`

	// Int64(e8), RUNE amount charged as swap liquidity fee
	LiquidityFee string `json:"liquidityFee"`

	// Transaction memo of the swap action
	Memo string `json:"memo"`

	// List of network fees associated to an action. One network fee is charged for each
	// outbound transaction
	NetworkFees NetworkFees `json:"networkFees"`

	// Streaming Metadata associated with the action if it was streaming swap
	StreamingSwapMeta *StreamingSwapMeta `json:"streamingSwapMeta,omitempty"`

	// Int64 (Basis points, 0-10000, where 10000=100%), swap slip percentage
	SwapSlip string `json:"swapSlip"`

	// Int64(e8), minimum output amount specified for the swap
	SwapTarget string `json:"swapTarget"`

	// The type of the transaction given from its Memo.
	// Type of Transaction:
	// "unknown", "add", "withdraw", "swap", "limitOrder", "outbound", "donate",
	// "bond", "unbond", "leave", "yggdrasilFund", "yggdrasilReturn", "reserve",
	// "refund", "migrate", "ragnarok", "switch", "noOp", "consolidate", "thorname",
	// "loanOpen", "loanRepayment"
	TxType string `json:"txType"`
}

SwapMetadata defines model for SwapMetadata.

type THORNameDetails

type THORNameDetails struct {

	// List details of all chains and their addresses for a given THORName
	Entries []THORNameEntry `json:"entries"`

	// Int64, THORChain block height in which THORName expires
	Expire string `json:"expire"`

	// owner's THOR address
	Owner string `json:"owner"`
}

THORNameDetails defines model for THORNameDetails.

type THORNameDetailsResponse

type THORNameDetailsResponse THORNameDetails

THORNameDetailsResponse defines model for THORNameDetailsResponse.

type THORNameEntry

type THORNameEntry struct {

	// address on blockchain
	Address string `json:"address"`

	// blockchain
	Chain string `json:"chain"`
}

THORNameEntry defines model for THORNameEntry.

type TVLHistory

type TVLHistory struct {
	Intervals TVLHistoryIntervals `json:"intervals"`
	Meta      TVLHistoryItem      `json:"meta"`
}

TVLHistory defines model for TVLHistory.

type TVLHistoryIntervals

type TVLHistoryIntervals []TVLHistoryItem

TVLHistoryIntervals defines model for TVLHistoryIntervals.

type TVLHistoryItem

type TVLHistoryItem struct {

	// Int64, The end time of bucket in unix timestamp
	EndTime    string                 `json:"endTime"`
	PoolsDepth []DepthHistoryItemPool `json:"poolsDepth"`

	// Float, the price of Rune based on the deepest USD pool at the end of the interval.
	RunePriceUSD string `json:"runePriceUSD"`

	// Int64, The beginning time of bucket in unix timestamp
	StartTime string `json:"startTime"`

	// Int64(e8), the total amount of bonds (both active and standby) at the end of
	// the interval
	TotalValueBonded *string `json:"totalValueBonded,omitempty"`

	// Int64(e8), total value locked in the chain (in rune)
	// This equals `totalPooledValue + totalBondedValue`, as it combines the liquidity
	// pools and bonds of the nodes.
	TotalValueLocked *string `json:"totalValueLocked,omitempty"`

	// Int64(e8) in rune, the total pooled value (both assets and rune) in all of the pools at
	// the end of the interval.
	// Note: this is twice the aggregate Rune depth of all pools.
	TotalValuePooled string `json:"totalValuePooled"`
}

TVLHistoryItem defines model for TVLHistoryItem.

type TVLHistoryResponse

type TVLHistoryResponse TVLHistory

TVLHistoryResponse defines model for TVLHistoryResponse.

type Transaction

type Transaction struct {

	// Sender address
	Address string `json:"address"`
	Coins   Coins  `json:"coins"`

	// The thorchain height that the outbound transaction occurred.
	Height *string `json:"height,omitempty"`

	// Transaction id hash. Some transactions (such as outbound transactions made in the
	// native asset) may have a zero value.
	TxID string `json:"txID"`
}

Transaction data

type WithdrawMetadata

type WithdrawMetadata struct {

	// Decimal (-1.0 <=> 1.0), indicates how assymetrical the withdrawal was. 0 means
	// totally symetrical
	Asymmetry string `json:"asymmetry"`

	// Int64 (Basis points, 0-10000, where 10000=100%), percentage of total pool ownership
	// withdrawn
	BasisPoints string `json:"basisPoints"`

	// Int64, additional Rune payed out because of impermanent loss protection
	ImpermanentLossProtection string `json:"impermanentLossProtection"`

	// Int64, amount of liquidity units removed from the member as result of the withdrawal
	LiquidityUnits string `json:"liquidityUnits"`

	// Transaction memo of the withdraw action
	Memo string `json:"memo"`

	// List of network fees associated to an action. One network fee is charged for each
	// outbound transaction
	NetworkFees NetworkFees `json:"networkFees"`
}

WithdrawMetadata defines model for WithdrawMetadata.

Jump to

Keyboard shortcuts

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