forked from f0cii/deribit-api
-
Notifications
You must be signed in to change notification settings - Fork 0
/
api_market.go
93 lines (74 loc) · 3.65 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
package deribit
import "github.com/finnag/deribit-api/models"
func (c *Client) GetBookSummaryByCurrency(params *models.GetBookSummaryByCurrencyParams) (result []models.BookSummary, err error) {
err = c.Call("public/get_book_summary_by_currency", params, &result)
return
}
func (c *Client) GetBookSummaryByInstrument(params *models.GetBookSummaryByInstrumentParams) (result []models.BookSummary, err error) {
err = c.Call("public/get_book_summary_by_instrument", params, &result)
return
}
func (c *Client) GetContractSize(params *models.GetContractSizeParams) (result models.GetContractSizeResponse, err error) {
err = c.Call("public/get_contract_size", params, &result)
return
}
func (c *Client) GetCurrencies() (result []models.Currency, err error) {
err = c.Call("public/get_currencies", nil, &result)
return
}
func (c *Client) GetFundingChartData(params *models.GetFundingChartDataParams) (result models.GetFundingChartDataResponse, err error) {
err = c.Call("public/get_funding_chart_data", params, &result)
return
}
func (c *Client) GetHistoricalVolatility(params *models.GetHistoricalVolatilityParams) (result models.GetHistoricalVolatilityResponse, err error) {
err = c.Call("public/get_historical_volatility", params, &result)
return
}
func (c *Client) GetIndex(params *models.GetIndexParams) (result models.GetIndexResponse, err error) {
err = c.Call("public/get_index", params, &result)
return
}
func (c *Client) GetInstruments(params *models.GetInstrumentsParams) (result []models.Instrument, err error) {
err = c.Call("public/get_instruments", params, &result)
return
}
func (c *Client) GetLastSettlementsByCurrency(params *models.GetLastSettlementsByCurrencyParams) (result models.GetLastSettlementsResponse, err error) {
err = c.Call("public/get_last_settlements_by_currency", params, &result)
return
}
func (c *Client) GetLastSettlementsByInstrument(params *models.GetLastSettlementsByInstrumentParams) (result models.GetLastSettlementsResponse, err error) {
err = c.Call("public/get_last_settlements_by_instrument", params, &result)
return
}
func (c *Client) GetLastTradesByCurrency(params *models.GetLastTradesByCurrencyParams) (result models.GetLastTradesResponse, err error) {
err = c.Call("public/get_last_trades_by_currency", params, &result)
return
}
func (c *Client) GetLastTradesByCurrencyAndTime(params *models.GetLastTradesByCurrencyAndTimeParams) (result models.GetLastTradesResponse, err error) {
err = c.Call("public/get_last_trades_by_currency_and_time", params, &result)
return
}
func (c *Client) GetLastTradesByInstrument(params *models.GetLastTradesByInstrumentParams) (result models.GetLastTradesResponse, err error) {
err = c.Call("public/get_last_trades_by_instrument", params, &result)
return
}
func (c *Client) GetLastTradesByInstrumentAndTime(params *models.GetLastTradesByInstrumentAndTimeParams) (result models.GetLastTradesResponse, err error) {
err = c.Call("public/get_last_trades_by_instrument_and_time", params, &result)
return
}
func (c *Client) GetOrderBook(params *models.GetOrderBookParams) (result models.GetOrderBookResponse, err error) {
err = c.Call("public/get_order_book", params, &result)
return
}
func (c *Client) GetTradeVolumes() (result models.GetTradeVolumesResponse, err error) {
err = c.Call("public/get_trade_volumes", nil, &result)
return
}
func (c *Client) GetTradingviewChartData(params *models.GetTradingviewChartDataParams) (result models.GetTradingviewChartDataResponse, err error) {
err = c.Call("public/get_tradingview_chart_data", params, &result)
return
}
func (c *Client) Ticker(params *models.TickerParams) (result models.TickerResponse, err error) {
err = c.Call("public/ticker", params, &result)
return
}