Search code examples
pythonapicryptocurrency

Shrimpy API does not Accept Public/Private Keys


We are trying to use Shrimpy's APIs. We used the code provided by them from here. For unknown reasons, when we provide it with our own public and private keys, the code crashes and returns us the following message:

StatusCodeError: 500 - "{"error":"Invalid IP address, API Key, or signature"}"

We used both the Python and JS codes. The error rises when we set the keys as follows:

import shrimpy

public_key = 'PUBLIC_KEY'
private_key = 'PRIVATE_KEY'
api_client = shrimpy.ShrimpyApiClient(public_key, private_key)
raw_token = api_client.get_token()
client = shrimpy.ShrimpyWsClient(error_handler, raw_token['token'])

Here, we get the error I mentioned before. I used the API keys right after their creation and I am confidence about their credibility (public key's length is 64 and private key's length is 128). I created them couple of times but nothing happened. When I call client.get_status(), it shows that the keys are not set:

{'apiKeyAccepted': False, 'apiNonceAccepted': False, 'apiSignatureAccepted': False, 'ipAccepted': True, 'requestsRemaining': 8}

I cannot understand if their API is not working or is there anything that I did not consider.


Solution

  • The problem was because our department provided us the wrong account. It was dashboard.shrimpy.ir not from developers.shrimpy.io.