-
Notifications
You must be signed in to change notification settings - Fork 1
/
deposit.go
57 lines (48 loc) · 1.89 KB
/
deposit.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
package gokraken
const (
// DepositMethodsResource is the API resource for deposit methods.
DepositMethodsResource = "DepositMethods"
// DepositAddressesResource is the API resource for deposit addresses.
DepositAddressesResource = "DepositAddresses"
// DepositStatusResource is the API resource for deposit status.
DepositStatusResource = "DepositStatus"
)
// DepositMethodsResponse represents the response from the DepositMethods
// endpoint of the Kraken API.
type DepositMethodsResponse map[string]DepositMethod
// DepositMethod represents a Kraken deposit method.
type DepositMethod struct {
Method string `json:"method"`
Limit float64 `json:"limit"`
Fee float64 `json:"fee"`
AddressSetupFee bool `json:"address-setup-fee"`
}
// DepositAddressesResponse represents the response from the DepositAddresses
// endpoint of the Kraken API.
type DepositAddressesResponse map[string]DepositAddress
// DepositAddress represents a Kraken deposit address.
type DepositAddress struct {
Address string `json:"address"`
ExpireTime int64 `json:"expiretm"`
New bool `json:"new"`
}
// DepositStatusResponse represents the response from the DepositStatus
// endpoint of the Kraken API.
type DepositStatusResponse struct {
Method string `json:"method"`
AClass string `json:"aclass"`
Asset string `json:"asset"`
RefID string `json:"refid"`
TxID string `json:"txid"`
Info string `json:"info"`
Amount float64 `json:"amount"`
Fee float64 `json:"fee"`
Time int64 `json:"time"`
Status string `json:"status"`
StatusProp DepositStatusProp `json:"status-prop"`
}
// DepositStatusProp represents additional status properties on a Kraken deposit
// status.
type DepositStatusProp struct {
OnHold string `json:"onhold"`
}