dto

package
v1.8.5 Latest Latest
Warning

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

Go to latest
Published: Apr 24, 2024 License: MIT Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Block

type Block struct {
	Network     string               `json:"network"`
	Date        uint64               `json:"date"`
	Trades      []*Trade             `json:"trades"`
	PairSwaps   []*models.PairSwap   `json:"pair_swaps"`
	DirectSwaps []*models.DirectSwap `json:"direct_swaps"`
}

func (*Block) Marshal

func (b *Block) Marshal() ([]byte, error)

func (*Block) UnMarshal

func (b *Block) UnMarshal(buf []byte) error

type Candle

type Candle struct {
	Open  float64 `json:"open"`
	Low   float64 `json:"low"`
	High  float64 `json:"high"`
	Date  int32   `json:"date"`
	Close float64 `json:"close"`
}

func (*Candle) Marshal

func (c *Candle) Marshal() ([]byte, error)

func (*Candle) UnMarshal

func (c *Candle) UnMarshal(buf []byte) error

type Candles

type Candles struct {
	Candle []*Candle `json:"c"`
	Volume *Volume   `json:"v"`
}

func (*Candles) Marshal

func (cs *Candles) Marshal() ([]byte, error)

func (*Candles) UnMarshal

func (cs *Candles) UnMarshal(buf []byte) error

type LastCandle added in v1.6.14

type LastCandle struct {
	BaseFlipped    *Candle `json:"base_flipped"`
	BaseNotFlipped *Candle `json:"base_not_flipped"`
	USDFlipped     *Candle `json:"usd_flipped"`
	USDNotFlipped  *Candle `json:"usd_not_flipped"`
	LastUpdate     int64   `json:"last_update"`
	IntervalTime   int64   `json:"interval_time"`
	Volume         *Volume `json:"volume"`
}

type Trade

type Trade struct {
	Pair      string   `json:"pair"`
	PriceA    float64  `json:"price_a"`
	PriceB    float64  `json:"price_b"`
	PriceAUSD float64  `json:"price_a_usd"`
	PriceBUSD float64  `json:"price_b_usd"`
	VolumeA   *big.Int `json:"volume_a"`
	VolumeB   *big.Int `json:"volume_b"`
	VolumeUSD float64  `json:"volume_usd"`
}

func (*Trade) Marshal

func (t *Trade) Marshal() ([]byte, error)

func (*Trade) UnMarshal

func (t *Trade) UnMarshal(buf []byte) error

type Volume

type Volume struct {
	VolumeA   *big.Int `json:"volume_a"`
	VolumeB   *big.Int `json:"volume_b"`
	VolumeUSD float64  `json:"volume_usd"`
}

func (*Volume) Marshal

func (v *Volume) Marshal() ([]byte, error)

func (*Volume) UnMarshal

func (v *Volume) UnMarshal(buf []byte) error

Jump to

Keyboard shortcuts

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