Installation
Install the package:Copy
go get github.com/tradewatch-io/go-sdk
Copy
import tradewatch "github.com/tradewatch-io/go-sdk"
Usage
Copy
package main
import (
"context"
"fmt"
"os"
tradewatch "github.com/tradewatch-io/go-sdk"
)
func main() {
limit := int32(56) // int32 | (optional)
interval := *tradewatch.NewAccountUsageStatisticsInterval() // AccountUsageStatisticsInterval | (optional)
configuration := tradewatch.NewConfiguration()
apiClient := tradewatch.NewAPIClient(configuration)
resp, r, err := apiClient.AccountAPI.GetUsage(context.Background()).Limit(limit).Interval(interval).Execute()
if err != nil {
fmt.Fprintf(os.Stderr, "Error when calling `AccountAPI.GetUsage``: %v\n", err)
fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
}
// response from `GetUsage`: AccountUsageStatistics
fmt.Fprintf(os.Stdout, "Response from `AccountAPI.GetUsage`: %v\n", resp)
}
