Skip to main content

Why do I see error '51155 Trading of this pair or contract is restricted' on OKX?

This error means the quote currency you selected is not allowed for trading in your country. Change your quote currency in the Base config to fix it.

Written by Pete Darby
Updated over 2 weeks ago

Error 51155 means OKX is blocking your bot's orders because the quote currency you selected is not allowed for trading in your country or jurisdiction. This is a local compliance restriction enforced by OKX — it is not an API key issue.

How to fix it

  1. Go to Configuration and open Base config.

  2. Click the Coins and amounts tab.

  3. Change the first option to a quote currency that is permitted in your country.

  4. Convert your funds to the new quote currency so your bot can continue trading.

Verify the issue is resolved

After saving your changes, check your bot's log. If the fix worked, error 51155 will no longer appear and your bot will resume placing orders.

Example of this error in your bot's log

Error placing buy order, data: {"error":"{\"code\":\"51155\",\"message\":\"Trading of this pair or contract is restricted due to local compliance requirements \"}"}

Did this answer your question?