-
-
Notifications
You must be signed in to change notification settings - Fork 20
Known Issues
This list documents known situations and possible workarounds. It is not, by any means, exhaustive or inclusve of every situation. There may well be better ways to address these issues as well. Feedback is always welcomed.
If you receive an error when closing a position, either by using the close action or selling at your balance level, here are the possible reasons I have encountered.
-
Your exchange (Binance is known for this) has a selling limit based upon your KYC (know your customer) level. The only solution is to try to sell at a lower amount. You will need to repeat this as much as needed to determine YOUR allowed amount. Research in this has revealed that a non-KYC limit seems to be at $505. YOUR explicit limit will most likely be different. Currently, I have not found a way to determine this level algorithmicly or through automated means other the repeatedly issueing sell orders of varying amounts, while reducing the amount each order. USE A TESTNET to help determine YOUR limits.
-
If your exchange has a "special coin" to pay your fees in, BNB for Binance, KNC for Kucoin, and you are NOT using it, or you are trying to close a position in this coin, it will most likely fail to close. In these cases, fees are added to the position size. In the case of a close, the resulting amount exceeds your balance. Jackrabbit Relay supports a reduction methodology to address this issue. Add the following to your exchange configuration or to your order,
"Reduction":"0.2",
This will explicitly reduce the amount you want to sell or close by the given percentage. A starting value is the taker rate multiplie by 2 (buying/selling wost case scenario). For Binance and Kucoin, that is 0.2. Finding the exact value YOU need is trial and error only. You may need to (de/in)rease to find the exact amout of successful reduction.
Please be aware that this situation can exist on any exchange that fails to properly close a position.
The BitMex tickers and orderbook are very unstable and often times do not return any values. I have deployed various tactics to try to get the most reliable information when possible. Unfortunately, there is little to nothing I can do when the exchange provides no information at all. Please use extreme caution when trading with this exchange.
This is specifically with listing its markets and requesting ticker data of each market sequentially. There seems to be some kind of limit with respect to the number of assets you can pull at one time. After that amount is reached, Phemex responds with an error they don't have documented. I have tried various methods to work around this, including skipping particular assets. Phemex seems to be able to count quite well though and is very persistent in its actions.
Here is an example output that demonstrates the condition. There is no workaround yet.
BTC/USD:BTC swap 16370.40000000 0.10000000 16370.30000000
USD/USD:ETH swap 1158.18000000 1.93000000 1156.25000000
ETH/USD:USD swap 2276.92000000 2.30000000 2274.62000000
XRP/USD:USD swap 0.37430000 0.00040000 0.37390000
LINK/USD:USD swap 7.00000000 3.41100000 3.58900000
XTZ/USD:USD swap 0.97900000 0.00200000 0.97700000
LTC/USD:USD swap 77.75000000 0.11000000 77.64000000
GOLD/USD:USD swap 1744.50000000 4.60000000 1739.90000000
ADA/USD:USD swap 0.00000000 -0.35000000 0.35000000
BCH/USD:USD swap 114.70000000 0.30000000 114.40000000
COMP/USD:USD swap 38.00000000 0.05000000 37.95000000
YFI/USD:USD swap 6057.00000000 17.00000000 6040.00000000
ALGO/USD:USD swap 0.23950000 0.00060000 0.23890000
TRX/USD:USD swap 0.05080000 0.00010000 0.05070000
EOS/USD:USD swap 0.89700000 0.00300000 0.89400000
ONT/USD:USD swap 0.17740000 0.00050000 0.17690000
NEO/USD:USD swap 6.91800000 0.01900000 6.89900000
DOT/USD:USD swap 5.34700000 0.00600000 5.34100000
UNI/USD:USD swap 5.40500000 0.01200000 5.39300000
AAVE/USD:USD swap 57.09000000 0.14000000 56.95000000
DOGE/USD:USD swap 0.07970000 0.00010000 0.07960000
BAT/USD:USD swap 0.22740000 0.00060000 0.22680000
CHZ/USD:USD swap 0.17830000 0.00070000 0.17760000
MANA/USD:USD swap 0.38740000 0.00080000 0.38660000
ENJ/USD:USD swap 0.29770000 0.00060000 0.29710000
SUSHI/USD:USD swap 1.17600000 0.00400000 1.17200000
SNX/USD:USD swap 1.72200000 0.00400000 1.71800000
GRT/USD:USD swap 0.06260000 0.00010000 0.06250000
MKR/USD:USD swap 655.80000000 1.80000000 654.00000000
ZEC/USD:USD swap 43.34000000 0.10000000 43.24000000
FIL/USD:USD swap 4.37900000 0.00600000 4.37300000
KSM/USD:USD swap 26.06000000 0.06000000 26.00000000
XMR/USD:USD swap 135.91000000 0.34000000 135.57000000
QTUM/USD:USD swap 2.10900000 0.00700000 2.10200000
XLM/USD:USD swap 0.08710000 0.00010000 0.08700000
ATOM/USD:USD swap 9.70200000 0.02900000 9.67300000
SOL/USD:USD swap 13.19600000 0.05400000 13.14200000
BTC/USD:USD swap 16370.00000000 14.10000000 16355.90000000
ZIL/USD:USD swap 0.02210000 0.00010000 0.02200000
GMT/USD:USD swap 0.38840000 0.00090000 0.38750000
BNB/USD:USD swap 293.95000000 0.70000000 293.25000000
AVAX/USD:USD swap 12.50200000 0.03200000 12.47000000
WAVES/USD:USD swap 2.21700000 0.00600000 2.21100000
ETC/USD:USD swap 19.26600000 0.06100000 19.20500000
SAND/USD:USD swap 0.55910000 0.00150000 0.55760000
APE/USD:USD swap 3.33000000 0.01000000 3.32000000
MATIC/USD:USD swap 0.84340000 0.00220000 0.84120000
GALA/USD:USD swap 0.02540000 0.00010000 0.02530000
AXS/USD:USD swap 6.77600000 0.01700000 6.75900000
NEAR/USD:USD swap 1.60500000 0.01000000 1.59500000
LRC/USD:USD swap 0.23680000 0.00070000 0.23610000
THETA/USD:USD swap 0.86130000 0.00230000 0.85900000
FTM/USD:USD swap 0.17940000 0.00060000 0.17880000
DYDX/USD:USD swap 1.91900000 0.00500000 1.91400000
CRV/USD:USD swap 0.62100000 0.00200000 0.61900000
DASH/USD:USD swap 42.19000000 0.14000000 42.05000000
ICP/USD:USD swap 3.80100000 0.00900000 3.79200000
KLAY/USD:USD swap 0.18230000 0.00050000 0.18180000
ONE/USD:USD swap 0.01410000 0.00010000 0.01400000
ALICE/USD:USD swap 1.21700000 0.00600000 1.21100000
SKL/USD:USD swap 0.02560000 0.00020000 0.02540000
IMX/USD:USD swap 0.43070000 0.00120000 0.42950000
KNC/USD:USD swap 0.59270000 0.00140000 0.59130000
RUNE/USD:USD swap 1.15200000 0.00400000 1.14800000
EGLD/USD:USD swap 41.45000000 0.10000000 41.35000000
GLMR/USD:USD swap 0.34800000 0.00300000 0.34500000
OMG/USD:USD swap 1.17300000 0.00600000 1.16700000
DAO/USD:USD swap 0.83700000 0.00300000 0.83400000
GAL/USD:USD swap 1.48150000 0.00390000 1.47760000
CELO/USD:USD swap 0.51000000 0.00500000 0.50500000
KAVA/USD:USD swap 0.91550000 0.00260000 0.91290000
FLOW/USD:USD swap 1.15600000 0.00600000 1.15000000
OGN/USD:USD swap 0.10010000 0.00040000 0.09970000
1INCH/USD:USD swap 0.53650000 0.00200000 0.53450000
BAL/USD:USD swap 5.52000000 0.02000000 5.50000000
MINA/USD:USD swap 0.54300000 0.00600000 0.53700000
BNX/USD:USD swap 156.85000000 0.45000000 156.40000000
2022-11-23 16:50:29.456814 3463732 fetch_ticker failed with: phemex {"error":{"code":6001,"message":"invalid argument"},"id":null,"result":null}
2022-11-23 16:50:29.457105 3463732 Processing Completed: 0:01:23.085131 seconds
When placing an order of any type, the below error occurs. The workaround is to disable the ledger system by addng this element to your exchange config:
"NoLedger":"Yes"
2023-01-04 18:18:23.196950 5436 PlaceOrder FUTURE 0.0.0.1.15
2023-01-04 18:18:23.197320 5436 Order parsed
2023-01-04 18:18:23.197546 5436 |- Exchange: bybit
2023-01-04 18:18:23.197739 5436 |- Market: swap
2023-01-04 18:18:23.197928 5436 |- Account: MAIN
2023-01-04 18:18:23.198118 5436 |- Action: buy
2023-01-04 18:18:23.198260 5436 |- Asset: MATIC/USDT:USDT
2023-01-04 18:18:23.198387 5436 |- USD: 20
2023-01-04 18:18:23.198504 5436 |- Leverage: 10
2023-01-04 18:18:23.198618 5436 |- OrderType: market
2023-01-04 18:18:25.329805 5436 Previous Balance: 0.00000000 contract amount
2023-01-04 18:18:25.330111 5436 Placing Order
2023-01-04 18:18:25.330337 5436 |- Asset: MATIC/USDT:USDT
2023-01-04 18:18:25.330533 5436 |- Action: buy
2023-01-04 18:18:25.330726 5436 |- Contracts: 24.69745616
2023-01-04 18:18:25.330924 5436 |- Price: 0.80980000
2023-01-04 18:18:25.331063 5436 |- Total: 20.00000000
2023-01-04 18:18:25.412827 5436 |- Order Confirmation ID: 11111111-2222-3333-4444-555555555555
2023-01-04 18:18:26.108301 5436 New Balance: 24.00000000 contract amount
2023-01-04 18:18:26.786585 5436 fetchClosedOrders failed with: bybit {"retCode":10004,"retMsg":"error sign! origin_string[api_key=oHJolrv7VK3QqNZGzA\u0026orderStatus=%5B'Filled',+'Canceled'%5D\u0026recv_window=5000\u0026settleCoin=USDT\u0026symbol=MATICUSDT\u0026timestamp=1672856306708]","result":{},"retExtInfo":{},"time":1672856306754}
2023-01-04 18:18:26.786933 5436 Processing Completed: 0:00:04.432890 seconds
MEMORY LEAK. Unfortunately, Python 3.10 is a train wreck in motion and will crash your VPS with extreme memory usage. You WILL have to upgrade your python to version 3.11 to correct the issue. The memory leak is well documented.
More information can be found scattered throught Google just by searching for python 3.10 memory leak
This article goes through the details of the memory leak fairly well.
Please follow this link for upgrading Python 3.10 to Python 3.11
Upgrading Python 3.10 to Python 3.11
UPDATE: While Python 3.10 still has memory leaks, The most recent versions of Jackrabbit Relay aren't as prone to issues due to a different methodology used in managing multiprocessing situations.
Please be aware that Kucoin Futures pair are NOT listed on TradingView charts, but there is a workaround. You can use Binance charts on pairs that cross match between both exchanges. There are time differences in price action, but they can be easily analyzed and compensated for, especially with Jackrabbit TV or another pure accumulation approach.
I have personally used this technique with considerable amount of success. Be sure to take your time in analyzing the slippage differences between the two exchanges. Careful testing is required to get the difference correct and Kucoin does not yet have a testnet for its futures market.
Please note that Jackrabbit Relay is not related to the Apache Jackrabbit project. Jackrabbit Relay is a standalone framework and API delivery system for automated algorithmic trading, designed for relaying JSON payloads that contain buy/sell order information between different systems (Charting software, forex brokers, cryptocrrency exchanges using REST). It is developed by Robert Darin and is not affiliated with or endorsed by the Apache Software Foundation or the Apache Jackrabbit project.
If you would like to help support this project financially, please click on the heart shaped sponsor's button in the right column of this page. I also have a merch store with some awesome and really cool products. Please visit supporting Jackrabbit for more options.
All subscriptions/sales go to the costs of sustaining Jackrabbit Relay. Thank you.
RAPMD Crypto: Automated algorithmic trading done right
Frequency Weighted OrderBook Analysis
Introduction
Jackrabbit Relay
Introduction
Risks
Disclaimer
Notes
Video
Supported Exchanges/Brokers
Security and firewall
Installation
Updating
Configuration files
Live Trading
Installation-and-Setup
Installation/Setup
Requirements
Stopping Version 1
Installing and setting up Version 2
Configuration
Reboot startup
Manual startup
Configuration
Configuration
Configuration files
Location and file names
File contents
Order types
Examples for the CCXT framework
Examples for the OANDA framework
Conditional Orders
JackrabbitRelay Order Payloads
Oliver Twist: Jackrabbit Relay conditional and orphan order manager
Unveiling Oliver Twist's Conditional Methodology
Managing Orphan Orders: The Limit-Only Approach
The Literary Significance of "Oliver Twist"
Supported-Exchanges-and-Brokers
Supported Exchanges/Brokers
Forex Brokers
Confirmed working brokers
Cryptocurrency Exchanges
Confirmed working exchanges
Theoretically supported
Known-Issues
Known Issues
Closing a position fails
BitMex
Phemex
ByBit
Python 3.10
Kucoin Futures/TradingView
Jackrabbit-Mimic
Jackrabbit Mimic
Introduction
Usage
Data Source Integration
Simple Setup Process
Understanding Differences
Educational Focus
Setup and Configuration
Wallets and history
How cryptocurrency wallets work
Long positions
Short positions
Alert/Signal messages
Long positions
Short positions
Supporting Jackrabbit Mimic
Testing-TradingView-connection
Testing TradingView connection
Testing method
Setup
DSR Testing
Force feeding payloads
Next Steps
Step-by-step guide to live trading with TradingView
Step-by-step guide to live trading with TradingView
Walk Through
Strategy Differences