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

Phemex: Fee payed in PT (Phemex token) ignored (fetchMyTrades) #22432

Closed
egabosh opened this issue May 8, 2024 · 1 comment · Fixed by #22481
Closed

Phemex: Fee payed in PT (Phemex token) ignored (fetchMyTrades) #22432

egabosh opened this issue May 8, 2024 · 1 comment · Fixed by #22481
Assignees
Labels

Comments

@egabosh
Copy link

egabosh commented May 8, 2024

Operating System

Debian Linux

Programming Languages

Python

CCXT Version

4.3.8

Description

With fetchMyTrades it looks like fee payed in PT (Phemex Token) is ignored.
Inn this vars from Phemex they show up:
"ptFeeRv": "0.110012249248",
"ptPriceRp": "0.876524893"

fee/fees from CCXT seems to be empty (cost 0).

Code

print(${STOCK_EXCHANGE}.fetchMyTrades(symbol='$f_symbol', limit=500, params={'paginate': True}))

Example Output

    "info": {
      "createdAt": "1714990724076",
      "symbol": "BTCUSDT",
      "currency": "USDT",
      "action": "1",
      "tradeType": "1",
      "execQtyRq": "0.003",
      "execPriceRp": "64935",
      "side": "2",
      "orderQtyRq": "0.003",
      "priceRp": "51600",
      "execValueRv": "194.805",
      "feeRateRr": "0.000495",
      "execFeeRv": "0",
      "ordType": "3",
      "execId": "XXXXXX",
      "execStatus": "7",
      "posSide": "1",
      "ptFeeRv": "0.110012249248",
      "ptPriceRp": "0.876524893"
    },
    "id": "XXXXXX",
    "symbol": "BTC/USDT:USDT",
    "timestamp": 1714990724076,
    "datetime": "2024-05-06T10:18:44.076Z",
    "order": null,
    "type": null,
    "side": "sell",
    "takerOrMaker": null,
    "price": 64935,
    "amount": 0.003,
    "cost": 194.805,
    "fee": {
      "cost": 0,
      "rate": 0.000495,
      "currency": "USDT"
    },
    "fees": [
      {
        "cost": 0,
        "rate": 0.000495,
        "currency": "USDT"
      }
    ]
  }

@carlosmiei carlosmiei self-assigned this May 8, 2024
@carlosmiei
Copy link
Collaborator

Hello @egabosh,
Thanks for reporting, yes I think we need to read the ptFee when execFeeRv is 0/null.

We will patch it shortly.

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

Successfully merging a pull request may close this issue.

2 participants