-
-
Notifications
You must be signed in to change notification settings - Fork 7.4k
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
Phemex: evaluate posSide in fetchMyTrades() and fetch_orders() #22518
Comments
Don't understand the CCXT code completely but looks like posSide is evaluated only if it is set to "Merged" in "python/ccxt/async_support/phemex.py" |
Hello @egabosh, I think we discussed this earlier, the |
Moin @carlosmiei . I understand your point but my problem is that I have no idea how I can find out with CCXT if it is a long or a short trade. |
@egabosh You can infer the direction using the For instance, if you fetch trades after opening/increase/decrease a position, depending on the positionMode one way-mode (does not really matter because there's only one side)
hedged-mode
|
Moin @carlosmiei, maybe I misunderstood something but posSide is only under info{} and I understood that we should not use the area in info{} because it is directly values from the exchange and therefore not uniform for each exchange. Example output here:
|
@egabosh You're right, the values inside |
@carlosmiei OK, thanks. At least I've understood that correctly :-) |
@egabosh Usually we unify behaviors when we detect a pattern across different exchanges, which is not the case here, at least yet. |
@carlosmiei OK, that makes it easier for me to understand. |
Operating System
Debian 12
Programming Languages
Python
CCXT Version
4.3.23
Description
Moin,
for an evaluation of all trades or orders of fetchMyTrades() fetch_orders() it would be very helpful to evaluate from Phemex given values posSide as well as Side.
I have not yet found a way to distinguish whether it is a short or long trade/order.
In Phemex Documentation example gives Short (or Long):
https://phemex-docs.github.io/#query-trades-history
In CCXT interpretation a value additionally to side like posside would be great!
see also issue #22512
Code
The text was updated successfully, but these errors were encountered: