Book a Demo!
CoCalc Logo Icon
StoreFeaturesDocsShareSupportNewsAboutPoliciesSign UpSign In
bitgetlimited
GitHub Repository: bitgetlimited/v3-bitget-api-sdk
Path: blob/master/bitget-golang-sdk-api/pkg/client/v2/spotmarketclient.go
518 views
1
package v2
2
3
import (
4
"bitget/internal"
5
"bitget/internal/common"
6
)
7
8
type SpotMarketClient struct {
9
BitgetRestClient *common.BitgetRestClient
10
}
11
12
func (p *SpotMarketClient) Init() *SpotMarketClient {
13
p.BitgetRestClient = new(common.BitgetRestClient).Init()
14
return p
15
}
16
17
func (p *SpotMarketClient) Coins() (string, error) {
18
params := internal.NewParams()
19
resp, err := p.BitgetRestClient.DoGet("/api/v2/spot/public/coins", params)
20
return resp, err
21
}
22
23
func (p *SpotMarketClient) Symbols(params map[string]string) (string, error) {
24
resp, err := p.BitgetRestClient.DoGet("/api/v2/spot/public/symbols", params)
25
return resp, err
26
}
27
28
func (p *SpotMarketClient) Fills(params map[string]string) (string, error) {
29
resp, err := p.BitgetRestClient.DoGet("/api/v2/spot/market/fills", params)
30
return resp, err
31
}
32
33
func (p *SpotMarketClient) Orderbook(params map[string]string) (string, error) {
34
resp, err := p.BitgetRestClient.DoGet("/api/v2/spot/market/orderbook", params)
35
return resp, err
36
}
37
38
func (p *SpotMarketClient) Tickers(params map[string]string) (string, error) {
39
resp, err := p.BitgetRestClient.DoGet("/api/v2/spot/market/tickers", params)
40
return resp, err
41
}
42
43
func (p *SpotMarketClient) Candles(params map[string]string) (string, error) {
44
resp, err := p.BitgetRestClient.DoGet("/api/v2/spot/market/candles", params)
45
return resp, err
46
}
47
48