Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 5 additions & 0 deletions api_market.go
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
5 changes: 5 additions & 0 deletions models/get_index_price_params.go
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
package models

type GetIndexPriceParams struct {
IndexName string `json:"index_name"`
}
6 changes: 6 additions & 0 deletions models/get_index_price_response.go
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
package models

type GetIndexPriceResponse struct {
EstimatedDeliveryPrice float64 `json:"estimated_delivery_price"`
IndexPrice float64 `json:"index_price"`
}
2 changes: 2 additions & 0 deletions models/instrument.go
Original file line number Diff line number Diff line change
Expand Up @@ -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"`
Expand Down