diff --git a/api_market.go b/api_market.go index 78c2cac..eae66ad 100644 --- a/api_market.go +++ b/api_market.go @@ -37,6 +37,11 @@ func (c *Client) GetIndex(params *models.GetIndexParams) (result models.GetIndex return } +func (c *Client) GetIndexPrice(params *models.GetIndexPriceParams) (result models.GetIndexPriceResponse, err error) { + err = c.Call("public/get_index_price", params, &result) + return +} + func (c *Client) GetInstruments(params *models.GetInstrumentsParams) (result []models.Instrument, err error) { err = c.Call("public/get_instruments", params, &result) return diff --git a/models/get_index_price_params.go b/models/get_index_price_params.go new file mode 100644 index 0000000..0c40571 --- /dev/null +++ b/models/get_index_price_params.go @@ -0,0 +1,5 @@ +package models + +type GetIndexPriceParams struct { + IndexName string `json:"index_name"` +} diff --git a/models/get_index_price_response.go b/models/get_index_price_response.go new file mode 100644 index 0000000..3cff36f --- /dev/null +++ b/models/get_index_price_response.go @@ -0,0 +1,6 @@ +package models + +type GetIndexPriceResponse struct { + EstimatedDeliveryPrice float64 `json:"estimated_delivery_price"` + IndexPrice float64 `json:"index_price"` +} diff --git a/models/instrument.go b/models/instrument.go index 09712e0..06cb57b 100644 --- a/models/instrument.go +++ b/models/instrument.go @@ -10,6 +10,8 @@ type Instrument struct { Kind string `json:"kind"` IsActive bool `json:"is_active"` InstrumentName string `json:"instrument_name"` + InstrumentType string `json:"instrument_type"` + PriceIndex string `json:"price_index"` ExpirationTimestamp int64 `json:"expiration_timestamp"` CreationTimestamp int64 `json:"creation_timestamp"` ContractSize float64 `json:"contract_size"`