structs

package
v0.0.0-...-a129c9c Latest Latest
Warning

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

Go to latest
Published: Sep 11, 2022 License: MIT Imports: 1 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type HistoricalPrice

type HistoricalPrice struct {
	Close     float64   `json:"close"`
	High      float64   `json:"high"`
	Low       float64   `json:"low"`
	Open      float64   `json:"open"`
	StartTime time.Time `json:"startTime"`
	Volume    float64   `json:"volume"`
}

type HistoricalPrices

type HistoricalPrices struct {
	Success      bool              `json:"success"`
	Result       []HistoricalPrice `json:"result"`
	ErrorMessage string            `json:"error"`
	HTTPCode     int
}

type ModifyTriggerOrder

type ModifyTriggerOrder struct {
	Size         float64 `json:"size"`
	TriggerPrice float64 `json:"triggerPrice,omitempty"`
}

type NewOrder

type NewOrder struct {
	Market                  string  `json:"market"`
	Side                    string  `json:"side"`
	Price                   float64 `json:"price"`
	Type                    string  `json:"type"`
	Size                    float64 `json:"size"`
	ReduceOnly              bool    `json:"reduceOnly"`
	Ioc                     bool    `json:"ioc"`
	PostOnly                bool    `json:"postOnly"`
	ExternalReferralProgram string  `json:"externalReferralProgram"`
}

type NewOrderResponse

type NewOrderResponse struct {
	Success      bool   `json:"success"`
	Result       Order  `json:"result"`
	ErrorMessage string `json:"error"`
	HTTPCode     int
}

type NewTriggerOrder

type NewTriggerOrder struct {
	Market           string  `json:"market"`
	Side             string  `json:"side"`
	Size             float64 `json:"size"`
	Type             string  `json:"type"`
	ReduceOnly       bool    `json:"reduceOnly"`
	RetryUntilFilled bool    `json:"retryUntilFilled"`
	TriggerPrice     float64 `json:"triggerPrice,omitempty"`
	OrderPrice       float64 `json:"orderPrice,omitempty"`
	TrailValue       float64 `json:"trailValue,omitempty"`
}

type NewTriggerOrderResponse

type NewTriggerOrderResponse struct {
	Success      bool         `json:"success"`
	Result       TriggerOrder `json:"result"`
	ErrorMessage string       `json:"error"`
	HTTPCode     int
}

type OpenOrders

type OpenOrders struct {
	Success bool    `json:"success"`
	Result  []Order `json:"result"`
}

type OpenTriggerOrders

type OpenTriggerOrders struct {
	Success bool           `json:"success"`
	Result  []TriggerOrder `json:"result"`
}

type Order

type Order struct {
	CreatedAt     time.Time `json:"createdAt"`
	FilledSize    float64   `json:"filledSize"`
	Future        string    `json:"future"`
	ID            int64     `json:"id"`
	Market        string    `json:"market"`
	Price         float64   `json:"price"`
	AvgFillPrice  float64   `json:"avgFillPrice"`
	RemainingSize float64   `json:"remainingSize"`
	Side          string    `json:"side"`
	Size          float64   `json:"size"`
	Status        string    `json:"status"`
	Type          string    `json:"type"`
	ReduceOnly    bool      `json:"reduceOnly"`
	Ioc           bool      `json:"ioc"`
	PostOnly      bool      `json:"postOnly"`
	ClientID      string    `json:"clientId"`
}

type OrderHistory

type OrderHistory struct {
	Success     bool    `json:"success"`
	Result      []Order `json:"result"`
	HasMoreData bool    `json:"hasMoreData"`
}

type Position

type Position struct {
	Cost                         float64 `json:"cost"`
	EntryPrice                   float64 `json:"entryPrice"`
	EstimatedLiquidationPrice    float64 `json:"estimatedLiquidationPrice"`
	Future                       string  `json:"future"`
	InitialMarginRequirement     float64 `json:"initialMarginRequirement"`
	LongOrderSize                float64 `json:"longOrderSize"`
	MaintenanceMarginRequirement float64 `json:"maintenanceMarginRequirement"`
	NetSize                      float64 `json:"netSize"`
	OpenSize                     float64 `json:"openSize"`
	RealizedPnl                  float64 `json:"realizedPnl"`
	ShortOrderSize               float64 `json:"shortOrderSize"`
	Side                         string  `json:"side"`
	Size                         float64 `json:"size"`
	UnrealizedPnl                float64 `json:"unrealizedPnl"`
	AverageOpenPrice             float64 `json:"recentAverageOpenPrice"`
	BreakEvenPrice               float64 `json:"recentBreakEvenPrice"`
}

collateralUsed: 2.51464 cost: 25.1464 cumulativeBuySize: 0.009 cumulativeSellSize: 0.001 entryPrice: 3143.3 estimatedLiquidationPrice: 0 future: "ETH-0924" initialMarginRequirement: 0.1 longOrderSize: 0 maintenanceMarginRequirement: 0.03 netSize: 0.008 openSize: 0.008 realizedPnl: 0.2636 recentAverageOpenPrice: 3116.8 recentBreakEvenPrice: 3113.725 recentPnl: 0.2366 shortOrderSize: 0 side: "buy" size: 0.008

type Positions

type Positions struct {
	Success      bool       `json:"success"`
	Result       []Position `json:"result"`
	ErrorMessage string     `json:"error"`
	HTTPCode     int
}

type Response

type Response struct {
	Success bool        `json:"success"`
	Result  interface{} `json:"result"`
}

type Subaccount

type Subaccount struct {
	Success bool `json:"success"`
	Result  struct {
		Nickname  string `json:"nickname"`
		Deletable bool   `json:"deletable"`
		Editable  bool   `json:"editable"`
	} `json:"result"`
}

type SubaccountBalance

type SubaccountBalance struct {
	Coin  string  `json:"coin"`
	Free  float64 `json:"free"`
	Total float64 `json:"total"`
}

type SubaccountBalances

type SubaccountBalances struct {
	Success bool `json:"success"`
	Result  []struct {
		Coin  string  `json:"coin"`
		Free  float64 `json:"free"`
		Total float64 `json:"total"`
	} `json:"result"`
}

type SubaccountsList

type SubaccountsList struct {
	Success bool `json:"success"`
	Result  []struct {
		Nickname  string `json:"nickname"`
		Deletable bool   `json:"deletable"`
		Editable  bool   `json:"editable"`
	} `json:"result"`
}

type Trade

type Trade struct {
	ID          int64     `json:"id"`
	Liquidation bool      `json:"liquidation"`
	Price       float64   `json:"price"`
	Side        string    `json:"side"`
	Size        float64   `json:"size"`
	Time        time.Time `json:"time"`
}

type Trades

type Trades struct {
	Success bool    `json:"success"`
	Result  []Trade `json:"result"`
}

type TransferSubaccounts

type TransferSubaccounts struct {
	Success bool `json:"success"`
	Result  struct {
		ID     int       `json:"id"`
		Coin   string    `json:"coin"`
		Size   float64   `json:"size"`
		Time   time.Time `json:"time"`
		Notes  string    `json:"notes"`
		Status string    `json:"status"`
	} `json:"result"`
}

type TriggerOrder

type TriggerOrder struct {
	CreatedAt        time.Time `json:"createdAt"`
	Error            string    `json:"error"`
	Future           string    `json:"future"`
	ID               int64     `json:"id"`
	Market           string    `json:"market"`
	OrderID          int64     `json:"orderId"`
	OrderPrice       float64   `json:"orderPrice"`
	ReduceOnly       bool      `json:"reduceOnly"`
	Side             string    `json:"side"`
	Size             float64   `json:"size"`
	Status           string    `json:"status"`
	TrailStart       float64   `json:"trailStart"`
	TrailValue       float64   `json:"trailValue"`
	TriggerPrice     float64   `json:"triggerPrice"`
	TriggeredAt      string    `json:"triggeredAt"`
	Type             string    `json:"type"`
	OrderType        string    `json:"orderType"`
	FilledSize       float64   `json:"filledSize"`
	AvgFillPrice     float64   `json:"avgFillPrice"`
	OrderStatus      string    `json:"orderStatus"`
	RetryUntilFilled bool      `json:"retryUntilFilled"`
}

type TriggerOrderHistory

type TriggerOrderHistory struct {
	Success     bool           `json:"success"`
	Result      []TriggerOrder `json:"result"`
	HasMoreData bool           `json:"hasMoreData"`
}

type Triggers

type Triggers struct {
	Success bool `json:"success"`
	Result  []struct {
		Error      string    `json:"error"`
		FilledSize float64   `json:"filledSize"`
		OrderSize  float64   `json:"orderSize"`
		OrderID    int64     `json:"orderId"`
		Time       time.Time `json:"time"`
	} `json:"result"`
}

Jump to

Keyboard shortcuts

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