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/spotaccountclient.go
518 views
1
package v2
2
3
import (
4
"bitget/internal"
5
"bitget/internal/common"
6
)
7
8
type SpotAccountClient struct {
9
BitgetRestClient *common.BitgetRestClient
10
}
11
12
func (p *SpotAccountClient) Init() *SpotAccountClient {
13
p.BitgetRestClient = new(common.BitgetRestClient).Init()
14
return p
15
}
16
17
func (p *SpotAccountClient) Info() (string, error) {
18
params := internal.NewParams()
19
resp, err := p.BitgetRestClient.DoGet("/api/v2/spot/account/info", params)
20
return resp, err
21
}
22
23
func (p *SpotAccountClient) Assets(params map[string]string) (string, error) {
24
resp, err := p.BitgetRestClient.DoGet("/api/v2/spot/account/assets", params)
25
return resp, err
26
}
27
28
func (p *SpotAccountClient) Bills(params map[string]string) (string, error) {
29
resp, err := p.BitgetRestClient.DoGet("/api/v2/spot/account/bills", params)
30
return resp, err
31
}
32
33
func (p *SpotAccountClient) TransferRecords(params map[string]string) (string, error) {
34
resp, err := p.BitgetRestClient.DoGet("/api/v2/spot/account/transferRecords", params)
35
return resp, err
36
}
37
38