NIJA now automatically detects and blacklists cryptocurrency symbols that cannot be traded due to geographic restrictions. This prevents the bot from repeatedly attempting to trade restricted assets.
Previously, when NIJA attempted to trade a geographically restricted asset (e.g., KMNO in Washington state), the trade would be rejected by the exchange. However, the bot would continue scanning and attempting to trade the same symbol in future cycles, wasting opportunities and preventing successful trades on non-restricted assets.
Example Error:
ERROR: EAccount:Invalid permissions:KMNO trading restricted for US:WA.
When a trade is rejected by the exchange, NIJA checks if the error message indicates a geographic restriction:
If a geographic restriction is detected:
bot/restricted_symbols.jsonOn bot startup:
bot/restricted_symbols.jsonDISABLED_PAIRSFile: bot/restricted_symbols.json
Format:
{
"symbols": [
"KMNO-USD",
"KMNOUSD"
],
"reasons": {
"KMNO-USD": "trading restricted for US:WA",
"KMNOUSD": "trading restricted for US:WA"
},
"last_updated": "2026-01-28T01:21:51.347391"
}
The blacklist is automatically logged on bot startup:
📋 Loaded 2 geographically restricted symbols
Restricted: KMNO-USD, KMNOUSD
You can manually add symbols to the blacklist by editing bot/restricted_symbols.json:
{
"symbols": [
"SYMBOL-USD",
"SYMBOLUSD"
],
"reasons": {
"SYMBOL-USD": "Your reason here",
"SYMBOLUSD": "Your reason here"
},
"last_updated": "2026-01-28T00:00:00.000000"
}
Note: Always include both the dash and no-dash formats of the symbol for maximum compatibility across exchanges.
If a symbol becomes available in your region:
bot/restricted_symbols.jsonsymbols array and reasons objectRestrictedSymbolsManager classOrderRejectedError exceptionsDISABLED_PAIRSThe system handles multiple symbol formats:
KMNO-USD → blacklists both KMNO-USD and KMNOUSDKMNOUSD → blacklists both KMNOUSD and KMNO-USDThis ensures compatibility across exchanges that use different symbol formats.
When a geographic restriction is detected, you’ll see:
═══════════════════════════════════════════════════════════
🚫 GEOGRAPHIC RESTRICTION DETECTED
═══════════════════════════════════════════════════════════
Symbol: KMNO-USD
Error: EAccount:Invalid permissions:KMNO trading restricted for US:WA
Adding to permanent blacklist to prevent future attempts
═══════════════════════════════════════════════════════════
🚫 Added to restriction blacklist: KMNO-USD
Reason: EAccount:Invalid permissions:KMNO trading restricted for US:WA
🚫 Added to restriction blacklist: KMNOUSD
Reason: EAccount:Invalid permissions:KMNO trading restricted for US:WA
💾 Saved restriction blacklist (2 symbols)
Potential improvements:
If restricted symbols aren’t being filtered:
bot/restricted_symbols.json existsDISABLED_PAIRS includes the symbolsIf a blacklisted symbol is still being traded:
The blacklist file is created automatically when the first geographic restriction is detected. If the file doesn’t exist on startup, it’s created as an empty blacklist.
For issues or questions:
bot/restricted_symbols.json syntax