adshao / go-binance

A Go SDK for Binance API
MIT License
1.48k stars 663 forks source link

feat(futures): include get open interest call #398

Closed rodrigo-brito closed 1 year ago

rodrigo-brito commented 1 year ago

Include service for:

Example of usage:

        openInterest, err := c.client.NewGetOpenInterestService().Symbol("BTCUSDT").Do(ctx)
    if err != nil {
        return err
    }

    fmt.Printf(" %+v\n", openInterest)

    statistics, err := c.client.NewOpenInterestStatisticsService().
        Symbol("BTCUSDT").Period("1h").
        Limit(24).
        Do(ctx)

    for i, statistic := range statistics {
        fmt.Printf("%d: %+v\n", i, statistic)
    }
codecov[bot] commented 1 year ago

Codecov Report

Merging #398 (cf76f3f) into master (5808316) will increase coverage by 0.12%. The diff coverage is 85.45%.

@@            Coverage Diff             @@
##           master     #398      +/-   ##
==========================================
+ Coverage   70.13%   70.26%   +0.12%     
==========================================
  Files          69       70       +1     
  Lines        6563     6618      +55     
==========================================
+ Hits         4603     4650      +47     
- Misses       1477     1481       +4     
- Partials      483      487       +4     
Impacted Files Coverage Δ
v2/futures/openinterest_service.go 84.31% <84.31%> (ø)
v2/futures/client.go 76.26% <100.00%> (+0.48%) :arrow_up:

Help us with your feedback. Take ten seconds to tell us how you rate us.