forked from KyberNetwork/deribit-api
-
Notifications
You must be signed in to change notification settings - Fork 0
/
api_account_management.go
87 lines (69 loc) · 3.26 KB
/
api_account_management.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
package deribit
import (
"context"
"github.com/KyberNetwork/deribit-api/models"
)
func (c *Client) GetAnnouncements(ctx context.Context) (result []models.Announcement, err error) {
err = c.Call(ctx, "public/get_announcements", nil, &result)
return
}
func (c *Client) ChangeSubaccountName(ctx context.Context, params *models.ChangeSubaccountNameParams) (result string, err error) {
err = c.Call(ctx, "private/change_subaccount_name", params, &result)
return
}
func (c *Client) CreateSubaccount(ctx context.Context) (result models.Subaccount, err error) {
err = c.Call(ctx, "private/create_subaccount", nil, &result)
return
}
func (c *Client) DisableTfaForSubaccount(ctx context.Context, params *models.DisableTfaForSubaccountParams) (result string, err error) {
err = c.Call(ctx, "private/disable_tfa_for_subaccount", params, &result)
return
}
func (c *Client) GetAccountSummary(ctx context.Context, params *models.GetAccountSummaryParams) (result models.AccountSummary, err error) {
err = c.Call(ctx, "private/get_account_summary", params, &result)
return
}
func (c *Client) GetEmailLanguage(ctx context.Context) (result string, err error) {
err = c.Call(ctx, "private/get_email_language", nil, &result)
return
}
func (c *Client) GetNewAnnouncements(ctx context.Context) (result []models.Announcement, err error) {
err = c.Call(ctx, "private/get_new_announcements", nil, &result)
return
}
func (c *Client) GetPosition(ctx context.Context, params *models.GetPositionParams) (result models.Position, err error) {
err = c.Call(ctx, "private/get_position", params, &result)
return
}
func (c *Client) GetPositions(ctx context.Context, params *models.GetPositionsParams) (result []models.Position, err error) {
err = c.Call(ctx, "private/get_positions", params, &result)
return
}
func (c *Client) GetSubaccounts(ctx context.Context, params *models.GetSubaccountsParams) (result []models.Subaccount, err error) {
err = c.Call(ctx, "private/get_subaccounts", params, &result)
return
}
func (c *Client) SetAnnouncementAsRead(ctx context.Context, params *models.SetAnnouncementAsReadParams) (result string, err error) {
err = c.Call(ctx, "private/set_announcement_as_read", params, &result)
return
}
func (c *Client) SetEmailForSubaccount(ctx context.Context, params *models.SetEmailForSubaccountParams) (result string, err error) {
err = c.Call(ctx, "private/set_email_for_subaccount", params, &result)
return
}
func (c *Client) SetEmailLanguage(ctx context.Context, params *models.SetEmailLanguageParams) (result string, err error) {
err = c.Call(ctx, "private/set_email_language", params, &result)
return
}
func (c *Client) SetPasswordForSubaccount(ctx context.Context, params *models.SetPasswordForSubaccountParams) (result string, err error) {
err = c.Call(ctx, "private/set_password_for_subaccount", params, &result)
return
}
func (c *Client) ToggleNotificationsFromSubaccount(ctx context.Context, params *models.ToggleNotificationsFromSubaccountParams) (result string, err error) {
err = c.Call(ctx, "private/toggle_notifications_from_subaccount", params, &result)
return
}
func (c *Client) ToggleSubaccountLogin(ctx context.Context, params *models.ToggleSubaccountLoginParams) (result string, err error) {
err = c.Call(ctx, "private/toggle_subaccount_login", params, &result)
return
}