-
Notifications
You must be signed in to change notification settings - Fork 6
/
account_api.go
33 lines (28 loc) · 936 Bytes
/
account_api.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
// API Key Info (https://bybit-exchange.github.io/docs/futuresV2/inverse/#t-key)
package iperpetual
import (
"time"
)
type GetKeyInfo struct {
}
func (o GetKeyInfo) Do(client *Client) ([]KeyInfo, error) {
return Get[[]KeyInfo](client, "account/api-key", o)
}
type KeyInfo struct {
ApiKey string `json:"api_key"`
Type string `json:"type"`
UserID int `json:"user_id"`
InviterID int `json:"inviter_id"`
Ips []string `json:"ips"`
Note string `json:"note"`
Permissions []string `json:"permissions"`
CreatedAt time.Time `json:"created_at"`
ExpiredAt time.Time `json:"expired_at"`
ReadOnly bool `json:"read_only"`
VipLevel string `json:"vip_level"`
MktMakerLevel string `json:"mkt_maker_level"`
AffiliateID int `json:"affiliate_id"`
}
func (o *Client) GetKeyInfo() ([]KeyInfo, error) {
return GetKeyInfo{}.Do(o)
}