rates

package
v0.0.0-...-8ecc595 Latest Latest
Warning

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

Go to latest
Published: Jun 23, 2020 License: MIT Imports: 3 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type AssetCandleRequest

type AssetCandleRequest struct {
	ID       string `json:"id"`
	Candle   []int  `json:"candle"`
	Provider string `json:"provider"`
}

AssetCandleRequest -

type Comissions

type Comissions struct {
	ActiveID int     `json:"active_id"`
	Value    float64 `json:"value"`
}

Comissions -

type Expiration

type Expiration struct {
	Time     int64 `json:"time"`
	Period   int   `json:"period"`
	DeadTime int   `json:"dead_time"`
	Others   map[string]interface{}
}

Expiration -

type PointStore

type PointStore struct {
	Candle sync.Map
}

PointStore -

func NewPointStore

func NewPointStore(candle []int) *PointStore

NewPointStore -

func (*PointStore) Count

func (cc *PointStore) Count(candle int) (c int)

Count -

func (*PointStore) Delete

func (cc *PointStore) Delete(candle int, key int64)

Delete -

func (*PointStore) DeleteMultiple

func (cc *PointStore) DeleteMultiple(candle int, key []int64)

DeleteMultiple -

func (*PointStore) GetFirst

func (cc *PointStore) GetFirst(candle int) (result Points, ok bool)

GetFirst -

func (*PointStore) GetLast

func (cc *PointStore) GetLast(candle int) (result Points, ok bool)

GetLast -

func (*PointStore) LoadAll

func (cc *PointStore) LoadAll(candle int) (c []Points)

LoadAll -

func (*PointStore) MakeMap

func (cc *PointStore) MakeMap() (c map[int][]Points)

MakeMap -

func (*PointStore) Store

func (cc *PointStore) Store(candle int, key int64, data Points)

Store -

type Points

type Points struct {
	Close       float64 `json:"close"`
	Open        float64 `json:"open"`
	High        float64 `json:"high"`
	Low         float64 `json:"low"`
	Ask         float64 `json:"ask"`
	Bid         float64 `json:"bid"`
	To          int64   `json:"to"`
	From        int64   `json:"from"`
	At          int64   `json:"at"`
	Size        int     `json:"size"`
	CandleColor string  `json:"candleColor"`
}

Points -

type Schedule

type Schedule struct {
	Status    string        `json:"status"`
	OpeningAt time.Duration `json:"openingAt"`
	ClosingAt time.Duration `json:"closingAt"`
	From      int64         `json:"from"`
	To        int64         `json:"to"`
}

Schedule -

type SendPoints

type SendPoints struct {
	AssetID    string
	ServerTime int64
	Provider   string
	SendTime   time.Time
	Current    map[int]Points
	Candles    map[int][]Points
	Others     map[string]interface{}
	RequestID  string
}

SendPoints -

type SendStatus

type SendStatus struct {
	AssetID    string
	ServerTime time.Time
	Provider   string
	SendTime   time.Time
	Current    map[int]Points
	RequestID  string
}

SendStatus -

type Spot

type Spot struct {
	Call  SpotItems `json:"call"`
	Put   SpotItems `json:"put"`
	Value int64     `json:"value"`
}

Spot -

type SpotItems

type SpotItems struct {
	ID     string  `json:"id"`
	Profit float64 `json:"profit"`
}

SpotItems -

type SyncMap

type SyncMap struct {
	sync.RWMutex
	// contains filtered or unexported fields
}

SyncMap -

func NewSyncMap

func NewSyncMap() *SyncMap

NewSyncMap -

func (*SyncMap) Count

func (rm *SyncMap) Count() (value int)

Count -

func (*SyncMap) Delete

func (rm *SyncMap) Delete(key int64)

Delete -

func (*SyncMap) DeleteMultiple

func (rm *SyncMap) DeleteMultiple(key []int64)

DeleteMultiple -

func (*SyncMap) GetFirst

func (rm *SyncMap) GetFirst() (result Points, ok bool)

GetFirst -

func (*SyncMap) GetLast

func (rm *SyncMap) GetLast() (result Points, ok bool)

GetLast -

func (*SyncMap) Load

func (rm *SyncMap) Load(key int64) (value Points, ok bool)

Load -

func (*SyncMap) LoadAll

func (rm *SyncMap) LoadAll() (value []Points)

LoadAll -

func (*SyncMap) Store

func (rm *SyncMap) Store(key int64, value Points)

Store -

Jump to

Keyboard shortcuts

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