common

package
v0.0.0-...-841ffdc Latest Latest
Warning

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

Go to latest
Published: Jul 8, 2024 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 ContractAdjustFactor

type ContractAdjustFactor struct {
	Symbol string `json:"symbol"`
	List   []List `json:"list,omitempty"`
}

type ContractHisOpenInterest

type ContractHisOpenInterest struct {
	Symbol       string `json:"symbol"`
	ContractType string `json:"contract_type"`
	Tick         []struct {
		Volume     string `json:"volume"`
		AmountType int    `json:"amount_type"`
		Ts         int64  `json:"ts"`
	} `json:"tick"`
}

type ContractInsuranceFund

type ContractInsuranceFund struct {
	Symbol string `json:"symbol"`
	Tick   []Tick `json:"tick,omitempty"`
}

type GetContractAdjustFactorResponse

type GetContractAdjustFactorResponse struct {
	Status string                 `json:"status"`
	Ts     int64                  `json:"ts"`
	Data   []ContractAdjustFactor `json:"data,omitempty"`
}

type GetContractApiStateResponse

type GetContractApiStateResponse struct {
	Status string `json:"status"`
	Ts     int64  `json:"ts"`
	Data   []struct {
		Symbol            string `json:"symbol"`
		Open              int    `json:"open"`
		Close             int    `json:"close"`
		Cancel            int    `json:"cancel"`
		TransferIn        int    `json:"transfer_in"`
		TransferOut       int    `json:"transfer_out"`
		MasterTransferSub int    `json:"master_transfer_sub"`
		SubTransferMaster int    `json:"sub_transfer_master"`
	} `json:"data"`
}

type GetContractContractInfoResponse

type GetContractContractInfoResponse struct {
	Status string `json:"status"`
	Data   []struct {
		Symbol         string  `json:"symbol"`
		ContractCode   string  `json:"contract_code"`
		ContractType   string  `json:"contract_type"`
		ContractSize   float64 `json:"contract_size"`
		PriceTick      float64 `json:"price_tick"`
		DeliveryDate   string  `json:"delivery_date"`
		CreateDate     string  `json:"create_date"`
		SettlementTime string  `json:"settlement_time"`
		DeliveryTime   string  `json:"delivery_time"`
		ContractStatus int     `json:"contract_status"`
	} `json:"data"`
	Ts int64 `json:"ts"`
}

type GetContractDeliveryPriceResponse

type GetContractDeliveryPriceResponse struct {
	Status string `json:"status"`
	Data   struct {
		DeliveryPrice float64 `json:"delivery_price"`
	} `json:"data"`
	Ts int64 `json:"ts"`
}

type GetContractEliteAccountRatioResponse

type GetContractEliteAccountRatioResponse struct {
	Status string `json:"status"`
	Ts     int64  `json:"ts"`
	Data   struct {
		Symbol string `json:"symbol"`
		List   []struct {
			BuyRatio    float32 `json:"buy_ratio"`
			SellRatio   float32 `json:"sell_ratio"`
			LockedRatio float32 `json:"locked_ratio"`
			Ts          int64   `json:"ts"`
		} `json:"list"`
	} `json:"data"`
}

type GetContractElitePositionRatioResponse

type GetContractElitePositionRatioResponse struct {
	Status string `json:"status"`
	Ts     int64  `json:"ts"`
	Data   struct {
		Symbol string `json:"symbol"`
		List   []struct {
			BuyRatio  float32 `json:"buy_ratio"`
			SellRatio float32 `json:"sell_ratio"`
			Ts        int64   `json:"ts"`
		} `json:"list"`
	} `json:"data"`
}

type GetContractEstimatedSettlementPriceResponse

type GetContractEstimatedSettlementPriceResponse struct {
	Status string `json:"status"`
	Data   []struct {
		Symbol string `json:"symbol"`
		List   []struct {
			ContractType             string  `json:"contract_type"`
			ContractCode             string  `json:"contract_code"`
			EstimatedSettlementPrice float64 `json:"estimated_settlement_price"`
			SettlementType           string  `json:"settlement_type"`
		} `json:"list"`
	} `json:"data"`
	Ts int64 `json:"ts"`
}

type GetContractHisOpenInterestResponse

type GetContractHisOpenInterestResponse struct {
	Status string                  `json:"status"`
	Ts     int64                   `json:"ts"`
	Data   ContractHisOpenInterest `json:"data"`
}

type GetContractIndexResponse

type GetContractIndexResponse struct {
	Status string `json:"status"`
	Data   []struct {
		Symbol     string  `json:"symbol"`
		IndexPrice float64 `json:"index_price"`
		IndexTs    int64   `json:"index_ts"`
	} `json:"data"`
	Ts int64 `json:"ts"`
}

type GetContractInsuranceFundResponse

type GetContractInsuranceFundResponse struct {
	Status string                `json:"status"`
	Ts     int64                 `json:"ts"`
	Data   ContractInsuranceFund `json:"data,omitempty"`
}

type GetContractLadderMarginResponse

type GetContractLadderMarginResponse struct {
	Status string `json:"status"`
	Data   []struct {
		Symbol string `json:"symbol"`
		List   []struct {
			LeverRate int `json:"lever_rate"`
			Ladders   []struct {
				MinMarginBalance   float64 `json:"min_margin_balance"`
				MaxMarginBalance   float64 `json:"max_margin_balance"`
				MinMarginAvailable float64 `json:"min_margin_available"`
				MaxMarginAvailable float64 `json:"max_margin_available"`
			} `json:"ladders"`
		} `json:"list"`
	} `json:"data"`
}

type GetContractLiquidationOrdersResponse

type GetContractLiquidationOrdersResponse struct {
	Code int    `json:"code"`
	Msg  string `json:"msg"`
	Ts   int64  `json:"ts"`
	Data []struct {
		QueryID      int64   `json:"query_id"`
		Symbol       string  `json:"symbol"`
		ContractCode string  `json:"contract_code"`
		Direction    string  `json:"direction"`
		Offset       string  `json:"offset"`
		Volume       float64 `json:"volume"`
		Amount       float64 `json:"amount"`
		Price        float64 `json:"price"`
		CreatedAt    int64   `json:"created_at"`
	} `json:"data"`
}

type GetContractOpenInterestResponse

type GetContractOpenInterestResponse struct {
	Status string `json:"status"`
	Data   []struct {
		Symbol        string  `json:"symbol"`
		ContractType  string  `json:"contract_type"`
		Volume        float64 `json:"volume"`
		Amount        float64 `json:"amount"`
		ContractCode  string  `json:"contract_code"`
		TradeAmount   float64 `json:"trade_amount"`
		TradeVolume   float64 `json:"trade_volume"`
		TradeTurnover float64 `json:"trade_turnover"`
	} `json:"data"`
	Ts int64 `json:"ts"`
}

type GetContractPriceLimitResponse

type GetContractPriceLimitResponse struct {
	Status string `json:"status"`
	Data   []struct {
		Symbol       string  `json:"symbol"`
		HighLimit    float64 `json:"high_limit"`
		LowLimit     float64 `json:"low_limit"`
		ContractCode string  `json:"contract_code"`
		ContractType string  `json:"contract_type"`
	} `json:"data"`
	Ts int64 `json:"ts"`
}

type GetContractQueryElementsResponse

type GetContractQueryElementsResponse struct {
	Status string `json:"status"`
	Data   []struct {
		ContractCode             string  `json:"contract_code"`
		TransferProfitRatio      float64 `json:"transfer_profit_ratio"`
		MinLevel                 string  `json:"min_level"`
		MaxLevel                 string  `json:"max_level"`
		OpenOrderLimit           string  `json:"open_order_limit"`
		OffsetOrderLimit         string  `json:"offset_order_limit"`
		LongPositionLimit        string  `json:"long_position_limit"`
		ShortPositionLimit       string  `json:"short_position_limit"`
		WeekHighNormalLimit      float64 `json:"week_hig_normal_limit"`
		WeekMinNormalLimit       float64 `json:"week_min_normal_limit"`
		WeekHighOpenLimit        float64 `json:"week_hig_open_limit"`
		WeekMinOpenLimit         float64 `json:"week_min_open_limit"`
		WeekHighTradeLimit       float64 `json:"week_hig_trade_limit"`
		WeekMinTradeLimit        float64 `json:"week_min_trade_limit"`
		BiweekHighNormalLimit    int     `json:"biweek_hig_normal_limit"`
		BiweekMinNormalLimit     int     `json:"biweek_min_normal_limit"`
		BiweekHighOpenLimit      int     `json:"biweek_hig_open_limit"`
		BiweekMinOpenLimit       int     `json:"biweek_min_open_limit"`
		BiweekHighTradeLimit     int     `json:"biweek_hig_trade_limit"`
		BiweekMinTradeLimit      int     `json:"biweek_min_trade_limit"`
		QuarterHighNormalLimit   float64 `json:"quarter_hig_normal_limit"`
		QuarterMinNormalLimit    float64 `json:"quarter_min_normal_limit"`
		QuarterHighOpenLimit     float64 `json:"quarter_hig_open_limit"`
		QuarterMinOpenLimit      float64 `json:"quarter_min_open_limit"`
		QuarterHighTradeLimit    float64 `json:"quarter_hig_trade_limit"`
		QuarterMinTradeLimit     float64 `json:"quarter_min_trade_limit"`
		BiquarterHighNormalLimit float64 `json:"biquarter_hig_normal_limit"`
		BiquarterMinNormalLimit  float64 `json:"biquarter_min_normal_limit"`
		InstrumentIndexCode      string  `json:"instrument_index_code"`
		RealTimeSettlement       int     `json:"real_time_settlement"`
		Ts                       int64   `json:"ts"`
		BiquarterHigOpenLimit    float64 `json:"biquarter_hig_open_limit"`
		BiquarterMinOpenLimit    float64 `json:"biquarter_min_open_limit"`
		BiquarterHigTradeLimit   float64 `json:"biquarter_hig_trade_limit"`
		BiquarterMinTradeLimit   float64 `json:"biquarter_min_trade_limit"`
		ContractInfos            []struct {
			ContractCode   string `json:"contract_code"`
			InstrumentType int    `json:"instrument_type"`
			CreateDate     string `json:"create_date"`
			ContractStatus int    `json:"contract_status"`
			DeliveryTime   string `json:"delivery_time"`
			DeliveryDate   string `json:"delivery_date"`
		} `json:"contract_infos"`
		OrderLimits []struct {
			Open           string `json:"open"`
			Close          string `json:"close"`
			InstrumentType int    `json:"instrument_type"`
		} `json:"order_limits"`
	} `json:"data"`
}

type GetContractRiskInfo

type GetContractRiskInfo struct {
	Symbol            string  `json:"symbol"`
	InsuranceFund     float64 `json:"insurance_fund"`
	EstimatedClawback float64 `json:"estimated_clawback"`
}

type GetContractRiskInfoResponse

type GetContractRiskInfoResponse struct {
	Status string                `json:"status"`
	Ts     int64                 `json:"ts"`
	Data   []GetContractRiskInfo `json:"data,omitempty"`
}

type GetContractSettlementRecordsResponse

type GetContractSettlementRecordsResponse struct {
	Status string `json:"status"`
	Ts     int64  `json:"ts"`
	Data   struct {
		SettlementRecord []SettlementRecord `json:"settlement_record"`
		TotalPage        int                `json:"total_page"`
		CurrentPage      int                `json:"current_page"`
		TotalSize        int                `json:"total_size"`
	} `json:"data"`
}

type Ladder

type Ladder struct {
	MinSize      float32 `json:"min_size"`
	MaxSize      float32 `json:"max_size"`
	Ladder       int     `json:"ladder"`
	AdjustFactor float32 `json:"adjust_factor"`
}

type List

type List struct {
	LeverRate float32  `json:"lever_rate"`
	Ladders   []Ladder `json:"ladders,omitempty"`
}

type SettlementList

type SettlementList struct {
	ContractCode    string  `json:"contract_code"`
	SettlementPrice float64 `json:"settlement_price"`
	SettlementType  string  `json:"settlement_type"`
}

type SettlementRecord

type SettlementRecord struct {
	Symbol         string           `json:"symbol"`
	SettlementTime int64            `json:"settlement_time"`
	ClawbackRatio  float64          `json:"clawback_ratio"`
	List           []SettlementList `json:"list"`
}

type Tick

type Tick struct {
	InsuranceFund float64 `json:"insurance_fund"`
	Ts            int64   `json:"ts"`
}

Jump to

Keyboard shortcuts

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