Skip to content

ListTickerNews iterator loops infinitely regardless of limit parameter #563

@erikkkwu

Description

@erikkkwu

Description

I'm not sure if I misunderstood or if it's an issue.

when using ListTickerNews, the iterator returned by client.ListTickerNews() loops infinitely and never terminates, regardless of whether the limit parameter is set or not.

Steps to Reproduce

params := models.ListTickerNewsParams{}
params = *params.WithLimit(10)

iter := client.ListTickerNews(ctx, &params)

for iter.Next() {
    item := iter.Item()
    // Process item...
}

if iter.Err() != nil {
    // Handle error
}

Expected Behavior

The iterator should stop after returning the specified number of results (or after exhausting all available results if no limit is set).

Actual Behavior

iter.Next() continues to return true indefinitely, causing an infinite loop.

Environment

  • client-go version: v2
  • Go version: 1.21+

Additional Context

This issue affects any code that iterates over ticker news results using the standard iterator pattern shown in the examples.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions