BitMEX/sample-market-maker

Error 403 w/ "order cancel" api keys

Closed this issue · 3 comments

In the sandbox, I cannot use API keys that have both "order" and "cancel" functionalities. Only API keys with "order" (and/or "withdraw") work. This may be an issue limited to the sandbox as I have not tested it live.

The exact error code is 2019-05-29 09:11:02,793 - ERROR - bitmex - Unhandled Error: 403 Client Error: Forbidden for url: https://testnet.bitmex.com/api/v1/order/bulk: {"erro r":{"message":"Access Denied","name":"HTTPError"}}.

To reproduce:

  1. Create an API key with "order cancel" capabilities
  2. Update settings.py
  3. $ DRY_RUN=True marketmaker XBTUSD
  4. Observe the error above

To reproduce a working market maker, follow all of the same steps above, except for step 1, only create an API key with "order" AND NOT "cancel".

I just tried this on the live site and can confirm that this issue is not just limited to testnet...

@STRML @ryanfox

STRML commented

See the documentation when you are creating a key. It is not intended nor even possible via the form to create a key with both capabilities.

image

Additionally, as I am sure you are aware, BitMEX does not support US customers and you are not able to deposit or trade on the live site.

So sorry, I just saw that fine print. I assumed 'order cancel' meant order & cancel.

So sorry.

Yes, of course. Doing some work for a client based in Singapore / HK