forked from hirokisan/bybit
/
account_asset.go
154 lines (128 loc) · 5.45 KB
/
account_asset.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
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
package bybit
import "github.com/google/go-querystring/query"
// AccountAssetService :
type AccountAssetService struct {
client *Client
}
// AccountAssetQueryInternalTransferListParam :
type AccountAssetQueryInternalTransferListParam struct {
TransferId string `url:"transferId,omitempty"`
Coin CoinContract `url:"coin,omitempty"`
Status string `url:"status,omitempty"`
StartTime int `url:"startTime,omitempty"`
EndTime int `url:"endTime,omitempty"`
Limit int `url:"limit,omitempty"`
Cursor string `url:"cursor,omitempty"`
}
// AccountAssetQueryInternalTransferListResponse :
type AccountAssetQueryInternalTransferListResponse struct {
CommonV3Response `json:",inline"`
Result AccountAssetQueryInternalTransferListResult `json:"result"`
}
// AccountAssetQueryInternalTransferListResult :
type AccountAssetQueryInternalTransferListResult struct {
List []AccountAssetQueryInternalTransferListItem `json:"list"`
NextPageCursor string `json:"nextPageCursor"`
}
// AccountAssetQueryInternalTransferListItem :
type AccountAssetQueryInternalTransferListItem struct {
TransferId string `json:"transferId"`
Coin string `json:"coin"`
Amount string `json:"amount"`
FromAccountType string `json:"fromAccountType"`
ToAccountType string `json:"toAccountType"`
Timestamp string `json:"timestamp"`
Status string `json:"status"`
}
func (a *AccountAssetService) QueryInternalTransferList(param AccountAssetQueryInternalTransferListParam) (*AccountAssetQueryInternalTransferListResponse, error) {
var res AccountAssetQueryInternalTransferListResponse
queryString, err := query.Values(param)
if err != nil {
return nil, err
}
if err := a.client.getPrivately("/asset/v3/private/transfer/inter-transfer/list/query", queryString, &res); err != nil {
return nil, err
}
return &res, nil
}
// AccountAssetQueryMasterSubTransferListParam :
type AccountAssetQueryMasterSubTransferListParam struct {
TransferId string `url:"transferId,omitempty"`
Coin CoinContract `url:"coin,omitempty"`
Status string `url:"status,omitempty"`
StartTime int `url:"startTime,omitempty"`
EndTime int `url:"endTime,omitempty"`
Limit int `url:"limit,omitempty"`
Cursor string `url:"cursor,omitempty"`
}
// AccountAssetQueryMasterSubTransferListResponse :
type AccountAssetQueryMasterSubTransferListResponse struct {
CommonV3Response `json:",inline"`
Result AccountAssetQueryMasterSubTransferListResult `json:"result"`
}
// AccountAssetQueryMasterSubTransferListResult :
type AccountAssetQueryMasterSubTransferListResult struct {
List []AccountAssetQueryMasterSubTransferListItem `json:"list"`
NextPageCursor string `json:"nextPageCursor"`
}
// AccountAssetQueryMasterSubTransferListItem :
type AccountAssetQueryMasterSubTransferListItem struct {
TransferId string `json:"transferId"`
Coin string `json:"coin"`
Amount string `json:"amount"`
MemberId int `json:"memberId"`
SubMemberId string `json:"subMemberId"`
Timestamp string `json:"timestamp"`
Status string `json:"status"`
Type string `json:"type"`
}
func (a *AccountAssetService) QueryMasterSubTransferList(param AccountAssetQueryMasterSubTransferListParam) (*AccountAssetQueryMasterSubTransferListResponse, error) {
var res AccountAssetQueryMasterSubTransferListResponse
queryString, err := query.Values(param)
if err != nil {
return nil, err
}
if err := a.client.getPrivately("/asset/v3/private/transfer/sub-member-transfer/list/query", queryString, &res); err != nil {
return nil, err
}
return &res, nil
}
// AccountAssetQueryInternalDepositRecordsListParam :
type AccountAssetQueryInternalDepositRecordsListParam struct {
Coin CoinContract `url:"coin,omitempty"`
StartTime int `url:"startTime,omitempty"`
EndTime int `url:"endTime,omitempty"`
Limit int `url:"limit,omitempty"`
Cursor string `url:"cursor,omitempty"`
}
// AccountAssetQueryInternalDepositRecordsListResponse :
type AccountAssetQueryInternalDepositRecordsListResponse struct {
CommonV3Response `json:",inline"`
Result AccountAssetQueryInternalDepositRecordsListResult `json:"result"`
}
// AccountAssetQueryInternalDepositRecordsListResult :
type AccountAssetQueryInternalDepositRecordsListResult struct {
List []AccountAssetQueryInternalDepositRecordsListItem `json:"rows"`
NextPageCursor string `json:"nextPageCursor"`
}
// AccountAssetQueryInternalDepositRecordsListItem :
type AccountAssetQueryInternalDepositRecordsListItem struct {
Id string `json:"id"`
Type int `json:"type"`
Coin string `json:"coin"`
Amount string `json:"amount"`
Status int `json:"status"`
Address string `json:"address"`
CreatedTime string `json:"createdTime"`
}
func (a *AccountAssetService) QueryInternalDepositRecordsList(param AccountAssetQueryInternalDepositRecordsListParam) (*AccountAssetQueryInternalDepositRecordsListResponse, error) {
var res AccountAssetQueryInternalDepositRecordsListResponse
queryString, err := query.Values(param)
if err != nil {
return nil, err
}
if err := a.client.getPrivately("/asset/v3/private/deposit/internal-deposit-record/query", queryString, &res); err != nil {
return nil, err
}
return &res, nil
}