forked from KyberNetwork/deribit-api
-
Notifications
You must be signed in to change notification settings - Fork 0
/
api_market.go
97 lines (77 loc) · 4.17 KB
/
api_market.go
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
package deribit
import (
"context"
"github.com/KyberNetwork/deribit-api/models"
)
func (c *Client) GetBookSummaryByCurrency(ctx context.Context, params *models.GetBookSummaryByCurrencyParams) (result []models.BookSummary, err error) {
err = c.Call(ctx, "public/get_book_summary_by_currency", params, &result)
return
}
func (c *Client) GetBookSummaryByInstrument(ctx context.Context, params *models.GetBookSummaryByInstrumentParams) (result []models.BookSummary, err error) {
err = c.Call(ctx, "public/get_book_summary_by_instrument", params, &result)
return
}
func (c *Client) GetContractSize(ctx context.Context, params *models.GetContractSizeParams) (result models.GetContractSizeResponse, err error) {
err = c.Call(ctx, "public/get_contract_size", params, &result)
return
}
func (c *Client) GetCurrencies(ctx context.Context) (result []models.Currency, err error) {
err = c.Call(ctx, "public/get_currencies", nil, &result)
return
}
func (c *Client) GetFundingChartData(ctx context.Context, params *models.GetFundingChartDataParams) (result models.GetFundingChartDataResponse, err error) {
err = c.Call(ctx, "public/get_funding_chart_data", params, &result)
return
}
func (c *Client) GetHistoricalVolatility(ctx context.Context, params *models.GetHistoricalVolatilityParams) (result models.GetHistoricalVolatilityResponse, err error) {
err = c.Call(ctx, "public/get_historical_volatility", params, &result)
return
}
func (c *Client) GetIndex(ctx context.Context, params *models.GetIndexParams) (result models.GetIndexResponse, err error) {
err = c.Call(ctx, "public/get_index", params, &result)
return
}
func (c *Client) GetInstruments(ctx context.Context, params *models.GetInstrumentsParams) (result []models.Instrument, err error) {
err = c.Call(ctx, "public/get_instruments", params, &result)
return
}
func (c *Client) GetLastSettlementsByCurrency(ctx context.Context, params *models.GetLastSettlementsByCurrencyParams) (result models.GetLastSettlementsResponse, err error) {
err = c.Call(ctx, "public/get_last_settlements_by_currency", params, &result)
return
}
func (c *Client) GetLastSettlementsByInstrument(ctx context.Context, params *models.GetLastSettlementsByInstrumentParams) (result models.GetLastSettlementsResponse, err error) {
err = c.Call(ctx, "public/get_last_settlements_by_instrument", params, &result)
return
}
func (c *Client) GetLastTradesByCurrency(ctx context.Context, params *models.GetLastTradesByCurrencyParams) (result models.GetLastTradesResponse, err error) {
err = c.Call(ctx, "public/get_last_trades_by_currency", params, &result)
return
}
func (c *Client) GetLastTradesByCurrencyAndTime(ctx context.Context, params *models.GetLastTradesByCurrencyAndTimeParams) (result models.GetLastTradesResponse, err error) {
err = c.Call(ctx, "public/get_last_trades_by_currency_and_time", params, &result)
return
}
func (c *Client) GetLastTradesByInstrument(ctx context.Context, params *models.GetLastTradesByInstrumentParams) (result models.GetLastTradesResponse, err error) {
err = c.Call(ctx, "public/get_last_trades_by_instrument", params, &result)
return
}
func (c *Client) GetLastTradesByInstrumentAndTime(ctx context.Context, params *models.GetLastTradesByInstrumentAndTimeParams) (result models.GetLastTradesResponse, err error) {
err = c.Call(ctx, "public/get_last_trades_by_instrument_and_time", params, &result)
return
}
func (c *Client) GetOrderBook(ctx context.Context, params *models.GetOrderBookParams) (result models.GetOrderBookResponse, err error) {
err = c.Call(ctx, "public/get_order_book", params, &result)
return
}
func (c *Client) GetTradeVolumes(ctx context.Context, params *models.GetTradeVolumesParams) (result models.GetTradeVolumesResponse, err error) {
err = c.Call(ctx, "public/get_trade_volumes", params, &result)
return
}
func (c *Client) GetTradingviewChartData(ctx context.Context, params *models.GetTradingviewChartDataParams) (result models.GetTradingviewChartDataResponse, err error) {
err = c.Call(ctx, "public/get_tradingview_chart_data", params, &result)
return
}
func (c *Client) Ticker(ctx context.Context, params *models.TickerParams) (result models.TickerResponse, err error) {
err = c.Call(ctx, "public/ticker", params, &result)
return
}