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

fetchBalance returning nothing with crypto.com #23528

Closed
rednasss opened this issue Aug 24, 2024 · 4 comments
Closed

fetchBalance returning nothing with crypto.com #23528

rednasss opened this issue Aug 24, 2024 · 4 comments
Assignees
Labels

Comments

@rednasss
Copy link

rednasss commented Aug 24, 2024

Operating System

Windows 10

Programming Languages

JavaScript

CCXT Version

No response

Description

When requesting fetchBalance it returns this:

{
  info: {
    id: XXX,
    method: 'private/user-balance',
    code: 0,
    result: { data: [] }
  },
  free: {},
  used: {},
  total: {}
}

What am I doing wrong?

Code

        const allBalances = await exchange.fetchBalance({});
        console.log(allBalances);  
@carlosmiei
Copy link
Collaborator

Hello @rednasss as you can see inside info the raw response from the exchange is empty for some reason. Can you see any balance in the web UI?

@carlosmiei carlosmiei self-assigned this Aug 26, 2024
@carlosmiei
Copy link
Collaborator

Btw I just tested it and it worked

Node.js: v18.18.0
CCXT v4.3.87
cryptocom.fetchBalance ()
2024-08-26T11:36:34.343Z iteration 0 passed in 367 ms

{
  BTC: { free: 0.0003999, used: 0, total: 0.0003999 },
  USDT: { free: 93.7223939875, used: 0, total: 93.7223939875 },
  CRO: { free: 0.99625, used: 0, total: 0.99625 },
  LTC: { free: 0.07109989, used: 0, total: 0.07109989 },
  XRP: { free: 0.99925, used: 0, total: 0.99925 },
  USD: { free: 50.46309702172734, used: 0, total: 50.46309702172734 },
  free: {
    BTC: 0.0003999,
    USDT: 93.7223939875,
    CRO: 0.99625,
    LTC: 0.07109989,
    XRP: 0.99925,
    USD: 50.46309702172734
  },
  used: { BTC: 0, USDT: 0, CRO: 0, LTC: 0, XRP: 0, USD: 0 },
  total: {
    BTC: 0.0003999,
    USDT: 93.7223939875,
    CRO: 0.99625,
    LTC: 0.07109989,
    XRP: 0.99925,
    USD: 50.46309702172734
  }
}

@rednasss
Copy link
Author

Ah, I found out. There was nothing in my crypto.com Exchange account, but it was all on my app account. I thought this would be the same..

@carlosmiei
Copy link
Collaborator

@rednasss Yeah, it's weird, but they are entirely separate accounts...

@github-staff github-staff deleted a comment from masooddahmedd Sep 10, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

3 participants
@rednasss @carlosmiei and others