dex

package
v0.0.0-...-96daba7 Latest Latest
Warning

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

Go to latest
Published: Jul 28, 2019 License: GPL-3.0 Imports: 3 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func AmountBytesToString

func AmountBytesToString(amt []byte) string

func TokenBytesToString

func TokenBytesToString(token []byte) string

Types

type DividendPoolInfo

type DividendPoolInfo struct {
	Amount         string           `json:"amount"`
	QuoteTokenType int32            `json:"quoteTokenType"`
	TokenInfo      *RpcDexTokenInfo `json:"tokenInfo,omitempty"`
}

type RpcBrokerFeeAccount

type RpcBrokerFeeAccount struct {
	Token      string                `json:"token"`
	MarketFees []*RpcBrokerMarketFee `json:"marketFees"`
}

type RpcBrokerFeeSumByPeriod

type RpcBrokerFeeSumByPeriod struct {
	BrokerFees []*RpcBrokerFeeAccount `json:"brokerFees"`
}

func BrokerFeeSumByPeriodToRpc

func BrokerFeeSumByPeriodToRpc(brokerFeeSum *dex.BrokerFeeSumByPeriod) *RpcBrokerFeeSumByPeriod

type RpcBrokerMarketFee

type RpcBrokerMarketFee struct {
	MarketId           int32  `json:"marketId"`
	TakerBrokerFeeRate int32  `json:"takerBrokerFeeRate"`
	MakerBrokerFeeRate int32  `json:"makerBrokerFeeRate"`
	Amount             string `json:"amount"`
}

type RpcDexTokenInfo

type RpcDexTokenInfo struct {
	TokenSymbol    string            `json:"tokenSymbol"`
	Decimals       int32             `json:"decimals"`
	TokenId        types.TokenTypeId `json:"tokenId"`
	Index          int32             `json:"index"`
	Owner          types.Address     `json:"owner"`
	QuoteTokenType int32             `json:"quoteTokenType"`
}

func TokenInfoToRpc

func TokenInfoToRpc(tinfo *dex.TokenInfo, tti types.TokenTypeId) *RpcDexTokenInfo

type RpcFeeSumByPeriod

type RpcFeeSumByPeriod struct {
	FeesForDividend   []*RpcFeeSumForDividend `json:"feesForDividend"`
	FeesForMine       []*RpcFeeSumForMine     `json:"feesForMine"`
	LastValidPeriod   uint64                  `json:"lastValidPeriod"`
	FinishFeeDividend bool                    `json:"finishFeeDividend"`
	FinishVxMine      bool                    `json:"finishVxMine"`
}

func FeeSumByPeriodToRpc

func FeeSumByPeriodToRpc(feeSum *dex.FeeSumByPeriod) *RpcFeeSumByPeriod

type RpcFeeSumForDividend

type RpcFeeSumForDividend struct {
	Token              string `json:"token"`
	DividendPoolAmount string `json:"dividendPoolAmount"`
}

type RpcFeeSumForMine

type RpcFeeSumForMine struct {
	QuoteTokenType    int32  `json:"quoteTokenType"`
	BaseAmount        string `json:"baseAmount"`
	InviteBonusAmount string `json:"inviteBonusAmount"`
}

type RpcMarketInfo

type RpcMarketInfo struct {
	MarketId           int32  `json:"marketId"`
	MarketSymbol       string `json:"marketSymbol"`
	TradeToken         string `json:"tradeToken"`
	QuoteToken         string `json:"quoteToken"`
	QuoteTokenType     int32  `json:"quoteTokenType"`
	TradeTokenDecimals int32  `json:"tradeTokenDecimals,omitempty"`
	QuoteTokenDecimals int32  `json:"quoteTokenDecimals"`
	TakerBrokerFeeRate int32  `json:"takerBrokerFeeRate"`
	MakerBrokerFeeRate int32  `json:"makerBrokerFeeRate"`
	AllowMine          bool   `json:"allowMine"`
	Valid              bool   `json:"valid"`
	Owner              string `json:"owner"`
	Creator            string `json:"creator"`
	Stopped            bool   `json:"stopped"`
	Timestamp          int64  `json:"timestamp"`
}

func MarketInfoToRpc

func MarketInfoToRpc(mkInfo *dex.MarketInfo) *RpcMarketInfo

type RpcPledgeForVxByPeriod

type RpcPledgeForVxByPeriod struct {
	Period uint64 `json:"period"`
	Amount string `json:"amount"`
}

type RpcPledgesForVx

type RpcPledgesForVx struct {
	Pledges []*RpcPledgeForVxByPeriod `json:"Pledges"`
}

func PledgesForVxToRpc

func PledgesForVxToRpc(pledges *dex.PledgesForVx) *RpcPledgesForVx

type RpcThresholdForTradeAndMine

type RpcThresholdForTradeAndMine struct {
	TradeThreshold string `json:"tradeThreshold"`
	MineThreshold  string `json:"mineThreshold"`
}

type RpcUserFeeAccount

type RpcUserFeeAccount struct {
	QuoteTokenType    int32  `json:"quoteTokenType"`
	BaseAmount        string `json:"baseAmount"`
	InviteBonusAmount string `json:"inviteBonusAmount"`
}

type RpcUserFeeByPeriod

type RpcUserFeeByPeriod struct {
	UserFees []*RpcUserFeeAccount `json:"userFees"`
	Period   uint64               `json:"period"`
}

type RpcUserFees

type RpcUserFees struct {
	Fees []*RpcUserFeeByPeriod `json:"fees"`
}

func UserFeesToRpc

func UserFeesToRpc(userFees *dex.UserFees) *RpcUserFees

type RpcVxFundByPeriod

type RpcVxFundByPeriod struct {
	Amount string `json:"amount"`
	Period uint64 `json:"period"`
}

type RpcVxFunds

type RpcVxFunds struct {
	Funds []*RpcVxFundByPeriod `json:"funds"`
}

func VxFundsToRpc

func VxFundsToRpc(funds *dex.VxFunds) *RpcVxFunds

Jump to

Keyboard shortcuts

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