Versions in this module Expand all Collapse all v2 v2.2.17 Jul 16, 2021 v2.2.16 Jul 15, 2021 v2.2.15 Jul 15, 2021 v2.2.14 Jun 21, 2021 Changes in this version + var UseTestnet = false v2.2.13 Jun 14, 2021 v2.2.12 Jun 13, 2021 v2.2.11 Jun 11, 2021 v2.2.10 Jun 10, 2021 v2.2.9 Jun 10, 2021 v2.2.8 Jun 10, 2021 Changes in this version type Client + func (c *Client) TransferHistory(ctx context.Context, req SubAccountTransferHistoryRequest, ...) (res *TransferHistoryResponse, err error) + type SubAccountTransferHistoryRequest struct + ClientTransferID string + EndTime int64 + FromID string + Limit int + Page int + ShowAllStatus bool + StartTime int64 + ToID string + type Transfer struct + Asset string + ClientTranId string + FromId string + Qty string + Status string + Time int64 + ToId string + TxnId string + type TransferHistoryResponse []*Transfer v2.2.7 Jun 8, 2021 v2.2.6 Jun 8, 2021 v2.2.5 Jun 8, 2021 v2.2.4 Jun 8, 2021 v2.2.3 Jun 8, 2021 Changes in this version + func FormatTimestamp(t time.Time) int64 + type ChangeApiPermissionRequest struct + CatTrade bool + FuturesTrade bool + MarginTrade bool + SubAccountApiKey string + SubAccountID int + type ChangeApiPermissionResponse struct + ApiKey string + CatTrade bool + FuturesTrade bool + MarginTrade bool + SubAccountID string + type ChangeSubAccountCommissionRequest struct + MakerCommission float32 + MarginMakerCommission float32 + MarginTakerCommission float32 + SubAccountID int + TakerCommission float32 + type ChangeSubAccountCommissionResponse struct + MakerCommission float32 + MarginMakerCommission float32 + SubAccountID string + TakerCommission float32 + TakerMakerCommission float32 + type Client struct + BaseURL string + Debug bool + HTTPClient *http.Client + Logger *log.Logger + TimeOffset int64 + func NewClient(apiKey, secretKey string, writer io.Writer) *Client + func (c *Client) ChangeSubAccountApiPermission(ctx context.Context, req ChangeApiPermissionRequest, opts ...RequestOption) (res *ChangeApiPermissionResponse, err error) + func (c *Client) ChangeSubAccountCommission(ctx context.Context, req ChangeSubAccountCommissionRequest, ...) (res *ChangeSubAccountCommissionResponse, err error) + func (c *Client) CreateApiKeyForSub(ctx context.Context, req CreateApiKeyRequest, opts ...RequestOption) (res *CreateApiKeyResponse, err error) + func (c *Client) CreateSubAccount(ctx context.Context, opts ...RequestOption) (res *SubAccount, err error) + func (c *Client) DeleteSubApiKey(ctx context.Context, req DeleteSubApiKeyRequest, opts ...RequestOption) error + func (c *Client) EnableFuturesSubAccount(ctx context.Context, subAccountId int, opts ...RequestOption) (res *EnableFuturesToSubAccountResponse, err error) + func (c *Client) EnableMarginSubAccount(ctx context.Context, subAccountId int, opts ...RequestOption) (res *EnableFuturesToSubAccountResponse, err error) + func (c *Client) SubAccountTransfer(ctx context.Context, req SubAccountTransferRequest, opts ...RequestOption) (res *SubAccountTransferResponse, err error) + type CreateApiKeyRequest struct + CanTrade bool + FuturesTrade bool + MarginTrade bool + SubAccountID int + type CreateApiKeyResponse struct + ApiKey string + CatTrade bool + FuturesTrade bool + MarginTrade bool + SecretKey string + SubAccountID string + type DeleteSubApiKeyRequest struct + ApiKey string + SubAccountID int + type EnableFuturesToSubAccountResponse struct + EnableFutures bool + SubAccountID string + UpdateTime int64 + type EnableMarginToSubAccountResponse struct + EnableMargin bool + SubAccountID string + UpdateTime int64 + type RequestOption func(*request) + func WithRecvWindow(recvWindow int64) RequestOption + type SubAccount struct + Email string + SubAccountID string + Tag string + type SubAccountTransferRequest struct + Amount float64 + Asset string + ClientTransferID string + FromID int + ToID int + type SubAccountTransferResponse struct + ClientTranID string + TxnID string