status

package
v0.0.0-...-9e0b26f Latest Latest
Warning

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

Go to latest
Published: Jun 8, 2021 License: MIT Imports: 4 Imported by: 2

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func FromWSRaw

func FromWSRaw(key string, data []interface{}) (interface{}, error)

FromWSRaw - based on condition will return snapshot or single record of derivative or liquidation data structure

Types

type Derivative

type Derivative struct {
	Symbol               string
	MTS                  int64
	Price                float64
	SpotPrice            float64
	InsuranceFundBalance float64
	FundingEventMTS      int64
	FundingAccrued       float64
	FundingStep          float64
	CurrentFunding       float64
	MarkPrice            float64
	OpenInterest         float64
	ClampMIN             float64
	ClampMAX             float64
}

func DerivFromRaw

func DerivFromRaw(symbol string, raw []interface{}) (*Derivative, error)

func DerivFromRestRaw

func DerivFromRestRaw(raw []interface{}) (t *Derivative, err error)

type DerivativesSnapshot

type DerivativesSnapshot struct {
	Snapshot []*Derivative
}

func DerivSnapshotFromRaw

func DerivSnapshotFromRaw(symbol string, raw [][]interface{}) (*DerivativesSnapshot, error)

type Liquidation

type Liquidation struct {
	Symbol        string
	PositionID    int64
	MTS           int64
	Amount        float64
	BasePrice     float64
	IsMatch       int
	IsMarketSold  int
	PriceAcquired float64
}

func LiqFromRaw

func LiqFromRaw(raw []interface{}) (*Liquidation, error)

type LiquidationsSnapshot

type LiquidationsSnapshot struct {
	Snapshot []*Liquidation
}

func LiqSnapshotFromRaw

func LiqSnapshotFromRaw(raw [][]interface{}) (*LiquidationsSnapshot, error)

Jump to

Keyboard shortcuts

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