question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Problem of API authentication with Okex

See original GitHub issue

Context

  • OS: OSX
  • Programming Language version: javascript (ES6 Babel in Chrome Browser)
  • CCXT version: 1.10.1124
  • Exchange: Okex
  • Method: fetchBalance()

Problem: unauthorized as reponse

Trying to fetch account info (fetchBalance) with okex. I get {result: false, error_code: 10017} which means API ~authentication~ authorization error.

The API key has been generated with neither withdrawal nor trade permissions activated, as it is meant to only get my account info.

I am not too sure about the relation between OKCoin and Okex. Just to be clear, I am using okex, the Chinese exchange at okex.com. I see the code is shared between these. And I also found a typo for the public api url.

Checking the request, I see the public key and the signature there. I don’t know if the signature is ok though.

Code used

this.okexClient = new ccxt.okex({
  apiKey: 'my key',
  secret: 'secret',
})

this.okexClient.fetchBalance()
  .then((res) => {
    console.log(res)
  })

Note: I use ccxt successfully with Kraken exchange, so I have a bit of practice using ccxt.

Issue Analytics

  • State:closed
  • Created 6 years ago
  • Comments:5 (2 by maintainers)

github_iconTop GitHub Comments

1reaction
AoDevcommented, Oct 15, 2019

@bleotu I never got a response. Not sure about having a ticket, I don’t find anything in my mails.

1reaction
bleotucommented, Oct 15, 2019

@AoDev any response from Okex to provide a read-only account? Do you have a ticker number for that?

Read more comments on GitHub >

github_iconTop Results From Across the Web

Trading service failure issue – Help center - OKX
Trading service failure issue ... a result of traffic overload and authentication service outage, affecting the web, app, and API servers.
Read more >
How to sign an OKEx API request? - Stack Overflow
The problem is that you are giving two different time values when calculating the values for OK-ACCESS-SIGN and OK-ACCESS-TIMESTAMP .
Read more >
Python: How to sign an OKEx API request? - Copy Programming
I keep getting an invalid sign error when trying to authenticate to the OKEx API, but am unable to see why my sign...
Read more >
OKEx API Setup - Coinrule Help Center
Make sure you have enabled the Google Authentication (2FA) since this is required to go ahead in the process. Create a V3 API...
Read more >
How can I authenticate API requests? - Zendesk help
Question How can I authenticate API requests using one of Zendesk v2 APIs? Answer You must be a verified user to make API...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found