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

OKX NumberFormatException on GetOrder #4718

Open
Wayruha opened this issue Apr 28, 2023 · 3 comments
Open

OKX NumberFormatException on GetOrder #4718

Wayruha opened this issue Apr 28, 2023 · 3 comments

Comments

@Wayruha
Copy link

Wayruha commented Apr 28, 2023

Getting NumberFormatException of GetOrder in case if order type is MARKET (price="").
There's a piece of code new BigDecimal(order.getPrice()) which is failing because of illegal argument "".
`java.lang.NumberFormatException: null
at java.base/java.math.BigDecimal.(BigDecimal.java:624)
at java.base/java.math.BigDecimal.(BigDecimal.java:401)
at java.base/java.math.BigDecimal.(BigDecimal.java:834)
at org.knowm.xchange.okex.OkexAdapters.adaptOrder(OkexAdapters.java:79)
at org.knowm.xchange.okex.service.OkexTradeService.getOrder(OkexTradeService.java:121)

@rizer1980
Copy link
Contributor

hi.
How is it that the answer comes with an empty field px (price)?

@Wayruha
Copy link
Author

Wayruha commented May 18, 2023

I can't answer this question as I'm not a representative of Okx or XChange. That's just a fact which I got for MARKET order

@rizer1980
Copy link
Contributor

Is the error permanent or did it happen once?
If permanent, show your code where it occurs.
and attach debug logs. such that the request and response from the OKX server were visible

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

2 participants