aloysius-pgast / crypto-exchanges-gateway

Your gateway to the world of crypto !
586 stars 152 forks source link

Okex doesn't work #129

Closed whitebone123 closed 2 years ago

whitebone123 commented 2 years ago

Hi, I have all exchanges working except Okex. Do you also have the same problem? Below is my environment:

In UI, under Okex exchange:

aloysius-pgast commented 2 years ago

Hi. My guess is you're passing an incorrect value for cfg.exchanges.okex.secret or cfg.exchanges.okex.password. Could you check network tab in browser console and see a 403 response is returned by gateway ?

whitebone123 commented 2 years ago
  1. Below is the screen shot of the network tab when error message popped up: image
  2. Below is the screen shot after close the error message: image

The error detail is: {origin: "remote",…} error: "okex {\"error_message\":\"Please change to port v1 when you are using v1 apiKey. If you wish to use port v3, please register a v3 apiKey.\",\"code\":30016,\"error_code\":\"30016\",\"message\":\"Please change to port v1 when you are using v1 apiKey. If you wish to use port v3, please register a v3 apiKey.\"}" extError: {errorType: "ExchangeError.InvalidRequest.UnknownError",…} origin: "remote" route: {method: "GET", path: "/exchanges/okex/balances/"}

aloysius-pgast commented 2 years ago

Can you try to generate a new api key (using V3 option) on Okex and see if it's working better ? (as the error message seems to indicate that's api key is using an old format).

whitebone123 commented 2 years ago

There is only V5 API key generation option in Okex now. Is it why the geatway throwh error? image

whitebone123 commented 2 years ago

I've generated another V5 API key and had the same error in gateway.

aloysius-pgast commented 2 years ago

Hi. I published a new version with support for OKex v5 API. After pulling the new docker image & re-creating the container, everything should be better. Let me know

whitebone123 commented 2 years ago

Hi, I've pulled the new version on dcoker. Everything works fine except 'Okex/My balances'. It shows an empty table, but I have few USDT in this account. image

aloysius-pgast commented 2 years ago

Can you ensure that you're using "Unified account" for OKex ?

whitebone123 commented 2 years ago

Yes, it is. My account mode is 'simple spot trading user'. I switched to 'Single-currency margin mode' and got the same result in Gateway.

aloysius-pgast commented 2 years ago

With a new account, balance shows up correctly after transfering funds from Funding account to Trading account. Are you able to trade from https://www.okex.com/trade-spot ?

whitebone123 commented 2 years ago

Hi, according to your suggestion, I transferred the USDT from funding account to trading account (unified account). And, It appeared in 'my balances'. Sorry about my misunderstanding of the unified account. BTW, do you have plan to support more exchanges like MEXC, Gate.io.

aloysius-pgast commented 2 years ago

Glas it’s working πŸ˜‰. Regarding adding more exchanges it might be possible but this project was mainly developed for our own use (small team of crypto enthusiasts). The idea was to make basic trading automation easier and have a unified basic ui across the exchanges we used the most. While the project is maintained, it does not really have enough traction to spend time integrating and supporting many exchanges. So unless we have many requests to implement a specific exchange, we will probably stick to the current ones 😁

whitebone123 commented 2 years ago

Ok, thanks. It's an excellent project. :+1: