Documentation ¶
Index ¶
- type AssetCandleRequest
- type CandleRequest
- type CandleRequestStatus
- type Comissions
- type Error
- type Expiration
- type PointStore
- func (cc *PointStore) Count(candle int) (c int)
- func (cc *PointStore) CountTicks() (c int)
- func (cc *PointStore) Delete(candle int, key int64)
- func (cc *PointStore) DeleteMultiple(candle int, key []int64)
- func (cc *PointStore) GetFirst(candle int) (result Points, ok bool)
- func (cc *PointStore) GetFirstKeyN(candle, num int) (result []int64)
- func (cc *PointStore) GetLast(candle int) (result Points, ok bool)
- func (cc *PointStore) Load(candle int, key int64) (value Points, ok bool)
- func (cc *PointStore) LoadAll(candle int) (c []Points)
- func (cc *PointStore) LoadTicks(key int64) (value Points, ok bool)
- func (cc *PointStore) MakeMap() (c map[int][]Points)
- func (cc *PointStore) MakeMapOption(from, to int64, limit int) (c map[int][]Points)
- func (cc *PointStore) Store(candle int, key int64, data Points)
- type Points
- type Schedule
- type SendPoints
- type SendStatus
- type Spot
- type SpotItems
- type Stores
- type SyncMap
- func (rm *SyncMap) Count() (value int)
- func (rm *SyncMap) CountTicks() (value int)
- func (rm *SyncMap) Delete(key int64)
- func (rm *SyncMap) DeleteMultiple(key []int64)
- func (rm *SyncMap) GetFirst() (result Points, ok bool)
- func (rm *SyncMap) GetFirstKeyN(num int) (result []int64)
- func (rm *SyncMap) GetLast() (result Points, ok bool)
- func (rm *SyncMap) Load(key int64) (value Points, ok bool)
- func (rm *SyncMap) LoadAll() (value []Points)
- func (rm *SyncMap) LoadAllOptions(from, to int64, limit int) (value []Points)
- func (rm *SyncMap) LoadTicks(key int64) (value Points, ok bool)
- func (rm *SyncMap) Store(key int64, value Points)
- func (rm *SyncMap) StoreTicks(key int64, value Points)
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 CandleRequest ¶
type CandleRequest struct { AssetID string `json:"assetID"` Ticks bool `json:"ticks"` FullMaps bool `json:"fullMaps"` Times []int64 `json:"times"` Start time.Time `json:"start"` End time.Time `json:"end"` Candle []int `json:"candle"` ForceEnable bool `json:"forceEnable"` RequestTime time.Time `json:"requestTime"` SaveResult bool `json:"saveResult"` WaitToFinish bool `json:"-"` OnReceiveCandle func(int64, Points) `json:"-"` Done func() `json:"-"` OnStatus func(CandleRequestStatus) `json:"-"` }
CandleRequest -
type CandleRequestStatus ¶
type CandleRequestStatus struct { RemainingCandle int `json:"remainingCandle"` CurrentSize int `json:"currentSize"` LastTime time.Time `json:"lastTime"` Count int `json:"count"` }
CandleRequestStatus -
type Comissions ¶
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 ¶
PointStore -
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) GetFirstKeyN ¶
func (cc *PointStore) GetFirstKeyN(candle, num int) (result []int64)
GetFirstKeyN -
func (*PointStore) GetLast ¶
func (cc *PointStore) GetLast(candle int) (result Points, ok bool)
GetLast -
func (*PointStore) Load ¶
func (cc *PointStore) Load(candle int, key int64) (value Points, ok bool)
Load -
func (*PointStore) LoadTicks ¶
func (cc *PointStore) LoadTicks(key int64) (value Points, ok bool)
LoadTicks -
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"` }
Points -
type Schedule ¶
type Schedule struct { IsOpen bool `json:"isOpen"` IsEnable bool `json:"isEnable"` IsSuspended bool `json:"isSuspended"` OpeningAt time.Time `json:"openingAt"` ClosingAt time.Time `json:"closingAt"` StartTime time.Time `json:"startTime"` }
Schedule -
type SendPoints ¶
type SendPoints struct { AssetID string `json:"assetID"` ServerTime time.Time `json:"serverTime"` Provider string `json:"provider"` SendTime time.Time `json:"sendTime"` IsTest bool `json:"isTest"` //Current map[int]Points `json:"current"` Candles map[int][]Points `json:"candles"` Others map[string]interface{} `json:"others"` RequestID string `json:"requestID"` Strategy strategy.Strategy `json:"strategy"` OnSignal func(strategy.SendingSignal) `json:"-"` OnCompleteCalculation func(strategy.CompleteCalculation) `json:"-"` GetPoints func(CandleRequest) (map[int][]Points, error) `json:"-"` }
SendPoints -
type SendStatus ¶
type SendStatus struct { AssetID string `json:"assetID"` Error *Error `json:"error"` ServerTime time.Time `json:"serverTime"` HistoryStartRequest time.Time `json:"historyStartRequest"` Provider string `json:"provider"` Role string `json:"role"` SendTime time.Time `json:"sendTime"` IsReady bool `json:"isReady"` IsConnected bool `json:"isConnected"` Active bool `json:"active"` Schedule Schedule `json:"schedule"` Current map[int]Points `json:"current"` NoOfAllData int `json:"noOfAllData"` RequestID string `json:"requestID"` }
SendStatus -
type Spot ¶
type Spot struct { Call SpotItems `json:"call"` Put SpotItems `json:"put"` Value int64 `json:"value"` }
Spot -
type SpotItems ¶
SpotItems -
type Stores ¶
type Stores struct { ProviderAssets sync.Map ProviderConfig sync.Map Provider sync.Map ProviderPlugins sync.Map }
Stores -
Click to show internal directories.
Click to hide internal directories.