Versions in this module Expand all Collapse all v2 v2.3.1 Jun 16, 2021 Changes in this version + func FormatTimestamp(t time.Time) int64 + type ChangeApiPermissionRequest struct + CatTrade bool + FuturesTrade bool + MarginTrade bool + SubAccountApiKey string + SubAccountID string + type ChangeApiPermissionResponse struct + ApiKey string + CatTrade bool + FuturesTrade bool + MarginTrade bool + SubAccountID string + type ChangeSubAccountCommissionRequest struct + MakerCommission float32 + MarginMakerCommission float32 + MarginTakerCommission float32 + SubAccountID string + 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) + func (c *Client) TransferHistory(ctx context.Context, req SubAccountTransferHistoryRequest, ...) (transfers []*Transfer, err error) + type CreateApiKeyRequest struct + CanTrade bool + FuturesTrade bool + MarginTrade bool + SubAccountID string + type CreateApiKeyResponse struct + ApiKey string + CatTrade bool + FuturesTrade bool + MarginTrade bool + SecretKey string + SubAccountID string + type DeleteSubApiKeyRequest struct + ApiKey string + SubAccountID string + 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 SubAccountTransferHistoryRequest struct + ClientTransferID string + EndTime int64 + FromID string + Limit int + Page int + ShowAllStatus bool + StartTime int64 + ToID string + type SubAccountTransferRequest struct + Amount float64 + Asset string + ClientTransferID string + FromID string + ToID string + type SubAccountTransferResponse struct + ClientTranID string + TxnID string + type Transfer struct + Asset string + ClientTranId string + FromId string + Qty string + Status string + Time int64 + ToId string + TxnId string + type TransferHistoryResponse []*Transfer