Skip to content

Latest commit

 

History

History
58 lines (41 loc) · 1.91 KB

File metadata and controls

58 lines (41 loc) · 1.91 KB

Account

Overview

Available Operations

Balance

Get Balance

Example Usage

package main

import(
	"context"
	"os"
	xapiscraper "github.com/twexapi-dev/x-api-scraper-go"
	"log"
)

func main() {
    ctx := context.Background()

    s := xapiscraper.New(
        xapiscraper.WithSecurity(os.Getenv("X_API_SCRAPER_BEARER_AUTH")),
    )

    res, err := s.Account.Balance(ctx)
    if err != nil {
        log.Fatal(err)
    }
    if res.StandardResponse != nil {
        // handle response
    }
}

Parameters

Parameter Type Required Description
ctx context.Context ✔️ The context to use for the request.
opts []operations.Option The options for this request.

Response

*operations.AccountGetBalanceResponse, error

Errors

Error Type Status Code Content Type
apierrors.APIError 4XX, 5XX */*