types

package
v0.0.0-...-795c9cd Latest Latest
Warning

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

Go to latest
Published: Aug 14, 2023 License: MIT Imports: 0 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type ExchangeInfo

type ExchangeInfo struct {
	Timezone        string `json:"timezone"`
	ServerTime      int64  `json:"serverTime"`
	OptionContracts []struct {
		ID          int    `json:"id"`
		BaseAsset   string `json:"baseAsset"`
		QuoteAsset  string `json:"quoteAsset"`
		Underlying  string `json:"underlying"`
		SettleAsset string `json:"settleAsset"`
	} `json:"optionContracts"`
	OptionAssets []struct {
		ID   int    `json:"id"`
		Name string `json:"name"`
	} `json:"optionAssets"`
	OptionSymbols []struct {
		ContractID int64 `json:"contractId"`
		ExpiryDate int64 `json:"expiryDate"`
		Filters    []struct {
			FilterType string `json:"filterType"`
			MinPrice   string `json:"minPrice,omitempty"`
			MaxPrice   string `json:"maxPrice,omitempty"`
			TickSize   string `json:"tickSize,omitempty"`
			MinQty     string `json:"minQty,omitempty"`
			MaxQty     string `json:"maxQty,omitempty"`
			StepSize   string `json:"stepSize,omitempty"`
		} `json:"filters"`
		ID                   int64  `json:"id"`
		Symbol               string `json:"symbol"`
		Side                 string `json:"side"`
		StrikePrice          string `json:"strikePrice"`
		Underlying           string `json:"underlying"`
		Unit                 int64  `json:"unit"`
		MakerFeeRate         string `json:"makerFeeRate"`
		TakerFeeRate         string `json:"takerFeeRate"`
		MinQty               string `json:"minQty"`
		MaxQty               string `json:"maxQty"`
		InitialMargin        string `json:"initialMargin"`
		MaintenanceMargin    string `json:"maintenanceMargin"`
		MinInitialMargin     string `json:"minInitialMargin"`
		MinMaintenanceMargin string `json:"minMaintenanceMargin"`
		PriceScale           int    `json:"priceScale"`
		QuantityScale        int    `json:"quantityScale"`
		QuoteAsset           string `json:"quoteAsset"`
	} `json:"optionSymbols"`
	RateLimits []struct {
		RateLimitType string `json:"rateLimitType"`
		Interval      string `json:"interval"`
		IntervalNum   int    `json:"intervalNum"`
		Limit         int    `json:"limit"`
	} `json:"rateLimits"`
}

type GetMarkPriceParam

type GetMarkPriceParam struct {
	Symbol string `url:"symbol,omitempty" validate:"omitempty"`
}

type GetOpenInterestParam

type GetOpenInterestParam struct {
	UnderlyingAsset string `url:"underlyingAsset" validate:"required"`
	Expiration      string `url:"expiration" validate:"required"`
}

type GetOrderbookParams

type GetOrderbookParams struct {
	Symbol string `url:"symbol" validate:"required"`
	Limit  int    `url:"limit,omitempty" validate:"omitempty,oneof=10 20 50 100 500 1000"`
}

type GetTickerPriceParam

type GetTickerPriceParam struct {
	Symbol string `url:"symbol,omitempty" validate:"omitempty"`
}

type GetTradeParams

type GetTradeParams struct {
	Symbol string `url:"symbol" validate:"required"`
	Limit  int    `url:"limit,omitempty" validate:"omitempty,max=500"`
}

type GetUnderlyingIndexPriceParams

type GetUnderlyingIndexPriceParams struct {
	Underlying string `url:"underlying" validate:"required"`
}

type Kline

type Kline struct {
	Open        string `json:"open"`
	High        string `json:"high"`
	Low         string `json:"low"`
	Close       string `json:"close"`
	Volume      string `json:"volume"`
	Interval    string `json:"interval"`
	TradeCount  int    `json:"tradeCount"`
	TakerVolume string `json:"takerVolume"`
	TakerAmount string `json:"takerAmount"`
	Amount      string `json:"amount"`
	OpenTime    int64  `json:"openTime"`
	CloseTime   int64  `json:"closeTime"`
}

type MarkPrice

type MarkPrice struct {
	Symbol         string `json:"symbol"`
	MarkPrice      string `json:"markPrice"`
	BidIV          string `json:"bidIV"`
	AskIV          string `json:"askIV"`
	MarkIV         string `json:"markIV"`
	Delta          string `json:"delta"`
	Theta          string `json:"theta"`
	Gamma          string `json:"gamma"`
	Vega           string `json:"vega"`
	HighPriceLimit string `json:"highPriceLimit"`
	LowPriceLimit  string `json:"lowPriceLimit"`
}

type OpenInterest

type OpenInterest struct {
	Symbol             string `json:"symbol"`
	SumOpenInterest    string `json:"sumOpenInterest"`
	SumOpenInterestUsd string `json:"sumOpenInterestUsd"`
	Timestamp          string `json:"timestamp"`
}

type Orderbook

type Orderbook struct {
	TransactionTime int64      `json:"T"`
	UpdateID        int64      `json:"u"`
	Bids            [][]string `json:"bids"`
	Asks            [][]string `json:"asks"`
}

type TickerPrice

type TickerPrice struct {
	Symbol             string `json:"symbol"`
	PriceChange        string `json:"priceChange"`
	PriceChangePercent string `json:"priceChangePercent"`
	LastPrice          string `json:"lastPrice"`
	LastQty            string `json:"lastQty"`
	Open               string `json:"open"`
	High               string `json:"high"`
	Low                string `json:"low"`
	Volume             string `json:"volume"`
	Amount             string `json:"amount"`
	BidPrice           string `json:"bidPrice"`
	AskPrice           string `json:"askPrice"`
	OpenTime           int64  `json:"openTime"`
	CloseTime          int64  `json:"closeTime"`
	FirstTradeID       int64  `json:"firstTradeId"`
	TradeCount         int64  `json:"tradeCount"`
	StrikePrice        string `json:"strikePrice"`
	ExercisePrice      string `json:"exercisePrice"`
}

type Trade

type Trade struct {
	ID       int64  `json:"id"`
	Symbol   string `json:"symbol"`
	Price    string `json:"price"`
	Qty      string `json:"qty"`
	QuoteQty string `json:"quoteQty"`
	Side     int    `json:"side"` // Completed trade direction(-1 Sell,1 Buy)
	Time     int64  `json:"time"`
}

type UnderlyingIndexPrice

type UnderlyingIndexPrice struct {
	Time       int64  `json:"time"`
	IndexPrice string `json:"indexPrice"`
}

Jump to

Keyboard shortcuts

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