-
-
Notifications
You must be signed in to change notification settings - Fork 294
/
get_deposit_history_request.go
51 lines (40 loc) · 1.66 KB
/
get_deposit_history_request.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
package binanceapi
import (
"time"
"github.com/c9s/requestgen"
"github.com/c9s/bbgo/pkg/fixedpoint"
"github.com/c9s/bbgo/pkg/types"
)
type DepositStatus int
const (
DepositStatusPending DepositStatus = 0
DepositStatusSuccess DepositStatus = 1
DepositStatusCredited DepositStatus = 6
DepositStatusWrong DepositStatus = 7
DepositStatusWaitingUserConfirm DepositStatus = 8
)
type DepositHistory struct {
Amount fixedpoint.Value `json:"amount"`
Coin string `json:"coin"`
Network string `json:"network"`
Status DepositStatus `json:"status"`
Address string `json:"address"`
AddressTag string `json:"addressTag"`
TxId string `json:"txId"`
InsertTime types.MillisecondTimestamp `json:"insertTime"`
TransferType int `json:"transferType"`
UnlockConfirm int `json:"unlockConfirm"`
// ConfirmTimes format = "current/required", for example: "7/16"
ConfirmTimes string `json:"confirmTimes"`
WalletType int `json:"walletType"`
}
//go:generate requestgen -method GET -url "/sapi/v1/capital/deposit/hisrec" -type GetDepositHistoryRequest -responseType []DepositHistory
type GetDepositHistoryRequest struct {
client requestgen.AuthenticatedAPIClient
coin *string `param:"coin"`
startTime *time.Time `param:"startTime,milliseconds"`
endTime *time.Time `param:"endTime,milliseconds"`
}
func (c *RestClient) NewGetDepositHistoryRequest() *GetDepositHistoryRequest {
return &GetDepositHistoryRequest{client: c}
}