This repository has been archived by the owner on Jul 25, 2023. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 1
/
asset_wallet.go
63 lines (58 loc) · 1.75 KB
/
asset_wallet.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
package client
import "time"
type AssetWallet struct {
Type string `json:"type"`
Attributes struct {
Cryptocoin struct {
Type string `json:"type"`
Attributes struct {
Wallets []struct {
Type string `json:"type"`
Attributes struct {
CryptocoinID string `json:"cryptocoin_id"`
CryptocoinSymbol string `json:"cryptocoin_symbol"`
Balance string `json:"balance"`
IsDefault bool `json:"is_default"`
Name string `json:"name"`
Deleted bool `json:"deleted"`
} `json:"attributes"`
ID string `json:"id"`
} `json:"wallets"`
} `json:"attributes"`
} `json:"cryptocoin"`
Commodity struct {
Metal struct {
Type string `json:"type"`
Attributes struct {
Wallets []struct {
Type string `json:"type"`
Attributes struct {
CryptocoinID string `json:"cryptocoin_id"`
CryptocoinSymbol string `json:"cryptocoin_symbol"`
Balance string `json:"balance"`
IsDefault bool `json:"is_default"`
Name string `json:"name"`
Deleted bool `json:"deleted"`
} `json:"attributes"`
ID string `json:"id"`
} `json:"wallets"`
} `json:"attributes"`
} `json:"metal"`
} `json:"commodity"`
} `json:"attributes"`
}
type AssetsWalletsGetResponse struct {
Data AssetWallet `json:"data"`
LastUserAction struct {
DateIso8601 time.Time `json:"date_iso8601"`
Unix string `json:"unix"`
} `json:"last_user_action"`
}
func (c *Client) AssetWalletsGet() (retResp AssetsWalletsGetResponse, err error) {
req, err := c.newGetRequest("/asset-wallets", nil)
if err != nil {
return
}
_, _, err = c.do(req, &retResp)
return
}