marketdata

package
v1.0.0 Latest Latest
Warning

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

Go to latest
Published: Dec 26, 2023 License: Apache-2.0 Imports: 0 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type BookSummary

type BookSummary struct {
	Volume            float64 `json:"volume"`
	UnderlyingPrice   float64 `json:"underlying_price"`
	UnderlyingIndex   string  `json:"underlying_index"`
	QuoteCurrency     string  `json:"quote_currency"`
	OpenInterest      float64 `json:"open_interest"`
	MidPrice          float64 `json:"mid_price"`
	MarkPrice         float64 `json:"mark_price"`
	Low               float64 `json:"low"`
	Last              float64 `json:"last"`
	InterestRate      float64 `json:"interest_rate"`
	InstrumentName    string  `json:"instrument_name"`
	High              float64 `json:"high"`
	CreationTimestamp int64   `json:"creation_timestamp"`
	BidPrice          float64 `json:"bid_price"`
	BaseCurrency      string  `json:"base_currency"`
	AskPrice          float64 `json:"ask_price"`
}

type Currency

type Currency struct {
	CoinType                       string               `json:"coin_type"`
	Currency                       string               `json:"currency"`
	CurrencyLong                   string               `json:"currency_long"`
	DisabledDepositAddressCreation bool                 `json:"disabled_deposit_address_creation"`
	FeePrecision                   int                  `json:"fee_precision"`
	MinConfirmations               int                  `json:"min_confirmations"`
	MinWithdrawalFee               float64              `json:"min_withdrawal_fee"`
	WithdrawalFee                  float64              `json:"withdrawal_fee"`
	WithdrawalPriorities           []WithdrawalPriority `json:"withdrawal_priorities"`
}

type GetBookSummaryByCurrencyParams

type GetBookSummaryByCurrencyParams struct {
	Currency string `json:"currency"`
	Kind     string `json:"kind,omitempty"`
}

type GetBookSummaryByInstrumentParams

type GetBookSummaryByInstrumentParams struct {
	InstrumentName string `json:"instrument_name"`
}

type GetContractSizeParams

type GetContractSizeParams struct {
	InstrumentName string `json:"instrument_name"`
}

type GetContractSizeResponse

type GetContractSizeResponse struct {
	ContractSize float64 `json:"contract_size"`
}

type GetFundingRateParams

type GetFundingRateParams struct {
	InstrumentName string `json:"instrument_name"`
	StartTimestamp int64  `json:"start_timestamp"`
	EndTimestamp   int64  `json:"end_timestamp"`
}

type GetIndexPriceParams

type GetIndexPriceParams struct {
	IndexName string `json:"index_name"`
}

type GetIndexPriceResponse

type GetIndexPriceResponse struct {
	EstimatedDeliveryPrice float64 `json:"estimated_delivery_price"`
	IndexPrice             float64 `json:"index_price"`
}

type GetInstrumentParams

type GetInstrumentParams struct {
	InstrumentName string `json:"instrument_name"`
}

type GetInstrumentsParams

type GetInstrumentsParams struct {
	Currency string `json:"currency"`
	Kind     string `json:"kind,omitempty"`
	Expired  bool   `json:"expired,omitempty"`
}

type GetLastTradesByInstrumentAndTimeParams

type GetLastTradesByInstrumentAndTimeParams struct {
	InstrumentName string `json:"instrument_name"`
	StartTimestamp int    `json:"start_timestamp"`
	EndTimestamp   int    `json:"end_timestamp"`
	Count          int    `json:"count,omitempty"`
	IncludeOld     bool   `json:"include_old,omitempty"`
	Sorting        string `json:"sorting,omitempty"`
}

type GetLastTradesResponse

type GetLastTradesResponse struct {
	Trades  []Trade `json:"trades"`
	HasMore bool    `json:"has_more"`
}

type GetOrderBookParams

type GetOrderBookParams struct {
	InstrumentName string `json:"instrument_name"`
	Depth          int    `json:"depth,omitempty"`
}

type GetOrderBookResponse

type GetOrderBookResponse struct {
	Timestamp int64 `json:"timestamp"`
	Stats     struct {
		Volume float64 `json:"volume"`
		Low    float64 `json:"low"`
		High   float64 `json:"high"`
	} `json:"stats"`
	State           string      `json:"state"`
	SettlementPrice float64     `json:"settlement_price"`
	OpenInterest    float64     `json:"open_interest"`
	MinPrice        float64     `json:"min_price"`
	MaxPrice        float64     `json:"max_price"`
	MarkPrice       float64     `json:"mark_price"`
	LastPrice       float64     `json:"last_price"`
	InstrumentName  string      `json:"instrument_name"`
	IndexPrice      float64     `json:"index_price"`
	Funding8H       float64     `json:"funding_8h"`
	CurrentFunding  float64     `json:"current_funding"`
	ChangeID        int         `json:"change_id"`
	Bids            [][]float64 `json:"bids"`
	BestBidPrice    float64     `json:"best_bid_price"`
	BestBidAmount   float64     `json:"best_bid_amount"`
	BestAskPrice    float64     `json:"best_ask_price"`
	BestAskAmount   float64     `json:"best_ask_amount"`
	Asks            [][]float64 `json:"asks"`
}

type GetTradingviewChartDataParams

type GetTradingviewChartDataParams struct {
	InstrumentName string `url:"instrument_name,omitempty" json:"instrument_name"`
	StartTimestamp int64  `url:"start_timestamp,omitempty" json:"start_timestamp"`
	EndTimestamp   int64  `url:"end_timestamp,omitempty" json:"end_timestamp"`
	Resolution     string `url:"resolution,omitempty" json:"resolution"`
}

type GetTradingviewChartDataResponse

type GetTradingviewChartDataResponse struct {
	Close  []float64 `json:"close"`
	Cost   []float64 `json:"cost"`
	High   []float64 `json:"high"`
	Low    []float64 `json:"low"`
	Open   []float64 `json:"open"`
	Volume []float64 `json:"volume"`
	Ticks  []int64   `json:"ticks"`
	Status string    `json:"status"`
}

type Instrument

type Instrument struct {
	TickSize            float64 `json:"tick_size"`
	MakerCommission     float64 `json:"maker_commission"`
	TakerCommission     float64 `json:"taker_commission"`
	Strike              float64 `json:"strike"`
	SettlementPeriod    string  `json:"settlement_period"`
	SettlementCurrency  string  `json:"settlement_currency"`
	QuoteCurrency       string  `json:"quote_currency"`
	PriceIndex          string  `json:"price_index"`
	OptionType          string  `json:"option_type"`
	MinTradeAmount      float64 `json:"min_trade_amount"`
	Kind                string  `json:"kind"`
	IsActive            bool    `json:"is_active"`
	InstrumentName      string  `json:"instrument_name"`
	ExpirationTimestamp int64   `json:"expiration_timestamp"`
	CreationTimestamp   int64   `json:"creation_timestamp"`
	ContractSize        float64 `json:"contract_size"`
	BaseCurrency        string  `json:"base_currency"`
}

type TickerParams

type TickerParams struct {
	InstrumentName string `json:"instrument_name"`
}

type TickerResponse

type TickerResponse struct {
	UnderlyingPrice float64 `json:"underlying_price"`
	UnderlyingIndex string  `json:"underlying_index"`
	Timestamp       int64   `json:"timestamp"`
	Stats           struct {
		VolumeUsd   float64 `json:"volume_usd"`
		Volume      float64 `json:"volume"`
		PriceChange float64 `json:"price_change"`
		Low         float64 `json:"low"`
		High        float64 `json:"high"`
	} `json:"stats"`
	State           string  `json:"state"`
	SettlementPrice float64 `json:"settlement_price"`
	OpenInterest    float64 `json:"open_interest"`
	MinPrice        float64 `json:"min_price"`
	MaxPrice        float64 `json:"max_price"`
	MarkPrice       float64 `json:"mark_price"`
	MarkIv          float64 `json:"mark_iv"`
	LastPrice       float64 `json:"last_price"`
	InterestRate    float64 `json:"interest_rate"`
	InstrumentName  string  `json:"instrument_name"`
	IndexPrice      float64 `json:"index_price"`
	Greeks          struct {
		Vega  float64 `json:"vega"`
		Theta float64 `json:"theta"`
		Rho   float64 `json:"rho"`
		Gamma float64 `json:"gamma"`
		Delta float64 `json:"delta"`
	} `json:"greeks"`
	EstimatedDeliveryPrice float64 `json:"estimated_delivery_price"`
	BidIv                  float64 `json:"bid_iv"`
	BestBidPrice           float64 `json:"best_bid_price"`
	BestBidAmount          float64 `json:"best_bid_amount"`
	BestAskPrice           float64 `json:"best_ask_price"`
	BestAskAmount          float64 `json:"best_ask_amount"`
	AskIv                  float64 `json:"ask_iv"`
}

type Trade

type Trade struct {
	TradeSeq       int     `json:"trade_seq"`
	TradeID        string  `json:"trade_id"`
	Timestamp      int64   `json:"timestamp"`
	TickDirection  int     `json:"tick_direction"`
	Price          float64 `json:"price"`
	MarkPrice      float64 `json:"mark_price"`
	InstrumentName string  `json:"instrument_name"`
	IndexPrice     float64 `json:"index_price"`
	Direction      string  `json:"direction"`
	Amount         float64 `json:"amount"`
}

type WithdrawalPriority

type WithdrawalPriority struct {
	Name  string  `json:"name"`
	Value float64 `json:"value"`
}

Jump to

Keyboard shortcuts

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