Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fetch_ticker in upbit #22500

Open
jshuh999 opened this issue May 15, 2024 · 4 comments
Open

fetch_ticker in upbit #22500

jshuh999 opened this issue May 15, 2024 · 4 comments
Assignees

Comments

@jshuh999
Copy link

Operating System

Ubuntu 22.04.4 LTS

Programming Languages

Python

CCXT Version

4.2.95

Description

I wrote a program using ccxt to retrieve coins with high upward trends on the Upbit exchange. However, I'm experiencing an issue where coins with low upward trends are being returned. When I query through the Upbit API directly, it returns the results correctly.

Code

exchange = ccxt.upbit({'apiKey': UPBIT_API_KEY, 'secret': UPBIT_SECRET_KEY})
tickers = exchange.fetch_tickers()

tickers_sorted = sorted(
    (ticker for ticker in tickers.values() if ticker['percentage'] is not None and ticker['symbol'].endswith(ticker_lang)),
    key=lambda x: x['percentage'],
    reverse=True
)

@carlosmiei
Copy link
Collaborator

Hello @jshuh999, what do you mean exactly by "low upward trends are being returned" ?

@carlosmiei carlosmiei self-assigned this May 15, 2024
@jshuh999
Copy link
Author

jshuh999 commented May 16, 2024 via email

@carlosmiei
Copy link
Collaborator

@jshuh999 Got it, thanks for clarifying it, we will take a look

@Dan-krm
Copy link
Contributor

Dan-krm commented May 17, 2024

Hi @jshuh999 I looked into fetchTicker, fetchTickers and parseTicker on upbit and they're using the signed_change_rate from the exchange response for the ccxt percentage value in our parsed response.

That seems to be the correct expected behavior so I'm not sure how to resolve your issue for you.

Could you provide an example of the incorrect response and the correct response that you're expecting?

This is the endpoint we're using for fetchTicker/fetchTickers:
https://docs.upbit.com/reference/ticker%ED%98%84%EC%9E%AC%EA%B0%80-%EC%A0%95%EB%B3%B4
https://global-docs.upbit.com/reference/tickers

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants