CAT Crypto Trading Bot Guide
Everything about CAT Automated Crypto Trading Bot Core related information and how to use it. Get started with our Crypto Trading Bot Guide.
From the Start Screen you can
– Exit C.A.T.
– Login Into an exchange
– Expand/Collapse current running exchanges
– View C.A.T. Version Info
– View Current RAM Usage
The frame is Resizable from Full Screen Minimum Size
- Press LOGIN Item on the Main Toolbar :
– Choose the site you want to log-in to.
– Insert your private and public keys and press enter. If an exchange needs the user-id a third textbox will appear.
– C.A.T. Crypto Trading Bot will verify your key and will try a call to the trading site you’ve chosen.
– No Third-Party Server Will be ever called by C.A.T.If KeyPair is accepted you will get a Welcome Message. You can now close the login window, and the main trading GUI will appear. Or you can also login to another exchange before closing the login window.
– C.A.T. will save your Public and Private Keys in a file named Key.XML. This file is located inside the CAT System Directory.
– C.A.T. Root directory is “currentRunCATdirectoryCATSystem”
– Exchange Root directory is “currentRunCATdirectoryCATSystemExchangeName”
– Inside the ExchangeName folder you will find these folders/files :
- ExchangeLogs (You will find logs at Exchange level, API print, Errors, etc…)
- MarketLogs (You will find logs at Single Market level)
- GainLogs (You will find logs about your Gains)
- EXCHANGER.xml (Exchange Options)
– If these folders don’t exist, C.A.T. will create them.
– C.A.T. Will also create a File Named: CAT_Log_YYYY-MM-DD_HH_MM_DD.txt in CAT System folder. If an error not handled by C.A.T. will occur, it will be printed inside this file. If the file is empty during the C.A.T. quit routine, that file will be deleted. Otherwise, SEND ME the file and I will take a look
Exchange Frame will appear after a successful login.
Action From The Toolbar :
– File Save Open Markets Parameters/Current Orders or Both
Load Markets Parameters/Restore Orders or Both Exit Exchange
- Open Markets List
- Your Balances
- Global Gain
- General Statistics
- General Console
– Markets Global Action (Action chosen is sent to all open markets)
- cancel/remove all kind of orders/trades
- start/stop/restart single processes
- reset some value
– Other Market Action :
- Check Difference Between Best Buy/Sell Orders on Each Open Markets
- Sort Current Open Market/Utility Tabs
- Close All Open Panels (for Markets Panel with Running Algorithms a confirmation message will appear)
– Tools :
– Execute A Full Automatic Backup Every X Minutes. You can choose to save all your open markets parameter and orders in automatic mode inside the Folder AutoBackups every X Minutes.
– No More Than 1 Api Call Every X Milliseconds. Useful when you want to set a limit to the number of API calls that will be performed by the CAT Api System during a certain amount of time. This is very useful when your connection has problems and all markets are in Lookup Status: when the connection will return active all pending requests will be processed at the same time causing a possible flood to the exchange, you can avoid this behavior using this option. Or you can use this option for exchanges who give limits like “No More than 60 calls / Minutes”. In that case, you will set this option to 1000 Milliseconds and you won’t have any ban problems.
– Limit CAT Log Elements to X: A CAT Log Elements is a message composed of 1 or more lines. With this option, any logs will have a maximum number of messages to be shown. When the limit is reached old messages will be removed (FIFO queue). Market Log Files on Disk (In folder ExchangeLogs and MarketLogs) are not affected by this option. Set a Very high value could cause RAM saturation, the suggested value is 100-300.
– Print API Call Result to API Console. Useful to print and look at API responses. Usually used when a debug log is needed
– Reproduce a Sound when a Ping-Pong is complete. You will hear a “ding-ding” sound for every completed ping-pong.
– Make a Post To URL When a Ping-Pong Is Completed. When this option is activated a POST Call will be performed and data about ping-pong will be sent to a REST Page.
A useful calculator that will help you to calculate the Buy/Sell Price According to the % GAIN you wants to have
– API Connection: Every API call, you will see a “red blink”. If the connection drops, the icon will change from green to red.
- % Difference is the price difference between the Highest and Lowest trades over the last 24 hours.
- Sell Order/Buy Order is the number of orders currently open.
- Sell Trade/Buy Trade 24H is the number of trades completed in the last 24 hours.
You can sort this table in Ascending/Descending Order by clicking on the Column Header
Double Click On a Row will Open a new Tab for the selected Market.
You can open MULTIPLE Markets at the same time using the CTRL (for single multiple select) or CTRL+CAPS (for multiple range select) and then RightClick->OpenMarket
If you want to check your balances press the button “Load Balances” Your Balances are highlighted in green. If Exchanges API returns the Held Values you will also see the HELD column. You can sort the table by Column. You Can Open A Market By Double Click the Coin Name (A Popup Will Ask You wich markets you want to open). You can Export Your Portfolio to CSV Format. Estimated Portfolio Values are calculated this way: BTC Amount + Sum of All AltCurrency * LastMarketPrice
The image shown is what you’ll see after opening a Market using the Market List
There’s a dedicated tab for each open market.
Quick Summary :
Market Panel has a Toolbar with :
– Market Label (just information about the market name)
– 2 Dropdown List
- The “Market Panels” Menu containing all the Panels you can open/collapse.
- The “Market Actions” Menu containing a set of actions you can perform on your Algorithm/Order/Trade. This is very similar to the Action Menu you can find on CAT Exchange Frame Toolbar
– an Algorithm Status label that helps you understand the Algorithm status. Market Panel have 6 Specific Panels
- Generator & Parameters: Used to Create Orders/Edit The BuySell Pool and Set Up Your Algorithm
- Orders & Trades: Used to monitor and edit all the current market structures
- Logs: Where you can read what actions/events are occurring while your algo is running. There’s also an Error Log Tab that is very important to check.
- Status & Statistics Panel: There you can perform some reset action and take a global look at some current/historical statistics
- Gains: Where you can check/export all your gains
- Market Explorer: Where you can load Your Order/Trades and Market Order/Trades. You can also use this panel to RESTORE your personal orders
– The “Market Panels” Menu contains all the panels you can expand/collapse.
– The “Market Operations” Menu containing a number of options which can be sent to the market :
- Start/Stop the entire process
- Stop/Restart a single task (for example the Ping Order Creation Process)
- Delete Orders (you have many options here about what kind of orders you wants to delete)
- Remove Trades (no PONG will be created from the removed trades)
- Reset some cumulative value
Status Label Meanings :
– Wait (Green): Algo Is Sleeping
– Lookup (Yellow): Algo is checking for trades/order creation/order recreation, etc…
– Red (Zombie): Market is inactive, no Buy/Sell Pool values, No Ping, No Pong, No Trades
– Stop (Black): Algo is not running
GENERATOR & PARAMETERS
This is where you create orders and update the Ping-Pong Algo. This is the most important tab.
This panel has 2 main panels :
– The PING-PONG Generator Panel
– Using this panel you can :
- Create new Ping Orders (GUI will help you choose the best price, qty, and static/dynamic order type)
- Update the buy/sell pool and let CAT create your pings for you (this is considered an advanced feature so you must first fully understand how the pool works)
- Check Your Balance/Get Current Market Spread/Get a Suggested Buy/Sell PriceCheck Market Limits: max/min quantity, prices, total, and a number of digits for the specific market.
–Order Creator Usage Example :
Press the Check Status & Validate Price Button if you want to get :
– Your Primary/Secondary Currency Balances
– The % difference between the Lowest Sell Price & the Highest Buy Price
– A suggestion about the price to start a Sell/Buy Orders (according to the algo parameter you have set).
Create/Add User Ping Orders.
– Choose Type+Price+Quantity+Mode(Static/Dynamic) and press ADD PING ORDER (repeat for each order you want to create)
– Press the CREATE ORDERS button and C.A.T will create new orders.
During Ping-Pong Running
– You can Update All Your Ping-Pong Parameters by pressing the Update Ping-Pong Parameter Button.
– You can add New Ping Orders (Add New Ping Orders Button).
Buy/Sell Pool Edit Example :
The value you must insert is a TOTAL Value (QTY * PRICE) in other words is a value expressed as PARTNER CURRENCY
You press the “New Values Preview” to take a look at how CAT will create your orders. That is only a preview based on current market values. All your limits/filters are not considered.
– The PING-PONG Parameters panel, where you can set all the Ping-Pong Algo Parameters attributes.
The panel is composed of few tabs, that let you modify Ping-Pong algorithm parameters.
When you want to UPDATE the current running Algorithm, you must press the UPDATE CURRENT PING-PONG PARAMETERS
- Static Mode
Choose a fixed price for Buy/Sell and C.A.T. will always Buy/Sell at these prices, without any adjustment.
- Normal Mode
– Min % Guaranteed Gain. Is the minimal % of GAIN you want to be guaranteed from C.A.T. after a Buy-Sell/Sell-Buy operation. If this percentage is not guaranteed, C.A.T. will wait. Default Value is Exchange Buy Fees + Sell Fees + 0.1%
– Create Ping Orders Only If Market Spread % Is > X : With this option Checked, C.A.T. will create new Ping Orders (From the Buy/Sell Pool) only if the current % Spread Between best market prices is > X
– Don’t create ping with total < Than: After a successful Ping-Pong the total amount of this order will be put in the “Buy/Sell Pool” and from the “Buy/Sell Pool” new sell/buy orders will be created. With this option activated you will limit the creation of “little orders”. If the total in the “Buy/Sell Pool” is < than this parameter, then C.A.T. will wait.
– Always Create Pong Orders From Trade: C.A.T., by default, tries to create your Pong Order on top of the sell/buy book order. If this is not possible (there’s no % Gain Guaranteed) C.A.T. will retry later. With this option activated, C.A.T. will calculate the minimum price (TradePrice +/- %GAIN) and will create the order INSIDE the Order Book.
– Avoid Immediate Price Match Order Book : with this option, you will never buy/sell directly (your Price directly match an active order). If a Price Match Occurs CAT will recalculate the price adding/subtracting a single market price unit.
– Check To Not Buy/Sell To Yourself: When you have Buy and Sell orders at the same time, after the price calculation, C.A.T. will check to not buy or sell to yourself. BUT in markets with 1 Satoshi difference between best buy/sell price, you must remove this option.
– Try to Stay Alone on Top Orders Book: With these options C.A.T. will always try to create your orders in the best position and alone with others orders
Normal Mode – Filters
When CAT load orders it loads the full order book. Then all calculations will be performed according to the best prices and order values.
If you want to DISCARD some order during MarketOrder API Call you can set 4 discard limits here. 2 For Buy Book and 2 For Sell Book
A Limit could work on QTY (when you want to set a limit for the Market Currency) or on TOTAL (Qty X Price) When you want to set a limit for Partner Currency). You can press the Preview Button to understand how CAT will remove orders and if you uncheck the option “Remove Filtered Orders From Preview” you’ll be able to understand the reason about remove action.
Don’t Forget that FILTERS is the first action CAT Perform before any other calculation
Normal Mode – Limit Rules
Anytime an order is created, the last price statistics are updated.
Your order has 2 Attributes: Ping/Pong Type and Buy/Sell Type
CAT actually is able to manage LAST SellPrice/SellPingPrice/SellPongPrice/BuyPrice/BuyPingPrice/BuyPongPrice.So you can create limits according to these values. But you can also create limits using static values. In this panel, you have 2 Editor: one for the static rules and another for the Dynamic rules. After a rule is added you will be able to read the description in the LIMIT List. You can now Edit/Remove rules. To Edit a Rules double click on the rule, then confirm/discard updates by pressing the OK Button or Cancel Button.
Normal Mode – Pong Stop Loss Rules
Very similar in usage as the LIMIT Panel, you can add STOP LOSS RULES for PONG Orders. Stop-Loss Rules could be on both sides: “Sell All” and “Buy All”.The rule could be STATIC or DYNAMIC. The Static rule is based on the current market price, so the limit will be triggered if the Market Value will match the limit. The Dynamic rules are based on the % SPREAD between the REFERENCE PRICE (The Ping Trade Price that generates the PONG) and the current market price. Suggestion is to set values < -10% (-15,-20 etc..).Stop Loss Action will be executed at the current matching market price.
Ping Pong Buy/Sell Pool Options
The buy-sell pool is the structure where new PING is calculated.
Values are updated in 2 ways
– User Edit The Values
– A Ping-Pong is completed and the Pong trade total value is put inside the Buy/Sell Pool
– Values are usually expressed as (Primary Currency is the Currency that you use to express the PRICE, usually is BTC)
Only the ADDING OPTION (% AND FIX) are expressed as QTY from the user side (and converted into PrimaryCurrency by CAT)
– Limit Buy/Sell Pool Max Value to If this value is reached new adding values will be discarded.
– Reuse % of total Pong Trade into Buy/Sell Pool: with this option active, only the % of the total (Qty*Price = PrimaryCurrency Value) of a Pong Trade will be reused into the buy/sell Pool.
– Never Create Ping With quantity >/< X: by Default, CAT try to use 100% of your total buy/sell pool to create new orders. With this option activated you can limit the total quantity of a single new ping-order.
– Add % Amount into / Pool Every Pool Lookup: This option will directly take a % Amount from your portfolio. % Is always calculated on QTY
% QTY calculated for MarketCurrency will be converted to PrimaryCurrency using current Market Values.
– Add FIX Amount into / Pool Every Pool Lookup: Like the option “ADD %” but using a FIXED Value. Values are expressed as QTY
FIX QTY calculated for MarketCurrency will be converted to PrimaryCurrency using current Market Values.
– Stop Ping Creation If Sell Value Is >: You can decide to Stop the Ping Order Creation if the Current Best Sell Value is too high. C.A.T. will restart Ping Order Creation if the Best Sell value returns to lower than your specified parameter.
– Stop Ping Creation If Buy Value Is <: You can decide to Stop the Ping Order Creation if the Current Best Buy Value if too low. C.A.T. will restart Ping Order Creation when the Best Buy value returns to higher than your specified parameter.
– Stop Ping Creation after X Ping-Pong Completed: when a number of ping-pong completed will reach X, ping creation will be stopped.
– Stop Ping Creation if Number of Active Orders > X: if the number of your active orders on that market is > X then ping creation will be stopped.
– Stop Ping Creation if Total Orders Amount is > X: If the total sum of orders amount (qty x price) will be > X ping creation will be stopped.
– Set Pool Value Amount to 0 if the current amount is < X: This option is used to clear the market pool if the value inside is too small. This option is set by default with Total Min Market Amount allowed (Qty x Price)
– If Needed Adequate new Ping Pool Order to Min Total (Qty x Price) : Starting from the Current Pool value, CAT could calculate an order where the total amount is under the min amount allowed by the exchange. With this option activated you will force CAT to reach the Min Amount Allowed adding some Qty to the Order. With this option, if you trade with 100% of your amount there’s a high risk to get a NO FUNDS Error from Exchange.
– If Pool Values > Available Amount then Adequate Pool Values to Available Amount: As the option says, if the pool value is over your available amount you can update it to your real available amount.
Ping Pong Dust Elements
It could happen that Partially filled orders and MicroTrades will be too small.
In some cases are too small from the user point of view (strategy), in some other cases are too small to allows CAT to recreate them or create an order from them (In case of Trade Over Ping).
Usually, CAT tries to adequate the order to the minimum values allowed by the exchange. But this behavior could be changed using these options.
– Ping Order is Dust if QTY is < X: A Ping order will be flagged as “Dust” if his current QTY is < X
– Ping Trades is Dust if QTY is < X: A Trade from Ping will be flagged as “Dust” if his QTY is < X
– Ping Trades is Dust if TOTAL (qty x Price) is < Min Total Market Orders (Qty x Price) : Min Total Market Orders is the Min Value allowed by a Market (usually it’s an Exchange rule) to create an order. This means that if a Trade is under that value, C.A.T. will need to adequate the Trade to that minimum value to create a Pong Order. With this option activated you will consider the trade As Dust
– Dust Elements are Discarded/Put Into BuySell Pool: with this option, you decide what to do with a dust element.
Ping Pong Running Option
– Exec a Lookup routine every X sec. : you can change this value to make C.A.T. lookup faster/slower than the default value. Be careful with this value because some exchanges perform an IP-ban if too many calls happen in little time.
– Exec an order recalculation routine very x Lookup: with this option, you can choose how many lookups must be performed before an order recalculation routine.
– Check Buy/Sell Pool every x Lookup: with this option you can choose how many lookups must be performed before a Buy/Sell Pool check
– Run Algorithm For XX Minutes and then return all to /: With this option, C.A.T. will run normally for the numbers of minutes set by the user, then it will stop creating Buy/Sell Ping Orders
– When Convert All To is Active delete Sell Ping: When RETURN TO is triggered, you can choose to delete the PING SELL.
– When Convert All To is Active delete Buy Ping: When RETURN TO is triggered, you can choose to delete the PING BUY.
Ping Pong Advanced Options
– If Necessary, Adequate Order to Min Total (Qty*Price): when option is active (by default is active) if the min-total value of an order is not reached (the Exchange will discard the new order request) CAT will adeguate the quantity to reach the minimum value to create an order.
– If Calculate Order QTY > Available QTY Then use all available QTY: Sometimes the Order QTY calculated/recalculated is higher than the QTY Available into Portfolio. With this option activated you will use the Available QTY instead of accepting the order creation request failure.
– Merge Equals Order/Trades into a new one: when the option is active, if there are 2 or more equal orders/trades (the same price, buy/sell type, ping/pong type) CAT will merge them into a new one.
– Never Recalculate Orders QTY during recalculation routine: By default, C.A.T. uses the TOTAL (QtyXPrice) original Amount to redetermine the new QTY after a new Price is Calculated. With this option, you will have always the Same QTY even if the Price will change.
FEES are calculated by CAT This way :
Qty x Price = Total (Partner Currency) – %FEES Over Toal = Available For Pong (If Trade is Ping) / Available For Buy/Sell Pool (If Trade Is Pong)
Then if PONG Order is a SELL, C.A.T. will also calculate the fees expressed as Qty. And that Qty will be the Available Amount to create the PONG.
– Subtract Fees From Ping Trade Buy Qty before creating Pong Sell: Some exchanges remove fees from your so if you want to use 100% QTY without remove fees (and use 100% bought qty) you must uncheck this option. But Take care of the way exchange gets your fees from a buy trade.
– Subtract Fees From Ping Trade Sell Total (Qty x Price) before creating Pong Buy: Sell Fees are always deducted from so this is a normal option. Uncheck this option only if you don’t trade with 100% Amount and you won’t consider FEES
– Subtract All Buy/Sell Pool Current Values while considering available amounts: API for Balances doesn’t know anything about the values into the buy/sell pool, but on the CAT side that coins should be used as soon as possible. With this option active, CAT will subtract the buy/sell pool values during the calculation of the Available Amount.
– Reduce orders to restore Qty by % before a creation retry: Usually, when you have an order to restore, there’s something that goes wrong during the order creation. Sometimes is a temporary problem, and sometimes you don’t have enough funds (usually due to some fees rounding). With this option, you can try to reduce the total amount before a new order creation call.
– Consider X% of your real / Currency: If you want to hide a percentage of amount from the CAT view, you can simply change this value to a little value, for example, 90%. CAT will discard the other 10%. This could be useful to let some amount for CAT rounding routines. Sometimes use 100% of the available amount could be risky when micro orders and micro trades come in play.
Ping Pong Current Parameters
You can always take a look at the current parameters from the CURRENT TAB.
ORDER & TRADES
– Orders To Restore: If an order creation will fail (after a delete/recreate routine) C.A.T. will put the order creation request inside this tab. The creation will be retried in the next lookup.
– Ping Orders: Ping Orders are the orders created from the GUI by the users or the automatic orders created from the Buy/Sell Pool
– Trades From Ping: From here new Pong Orders will be created.
– Pong Orders: Pong Orders are created from Trades. When a Pong Order is completed you will have a GAIN.
With a Right Click on a single Element you could :
– Recreate/Delete An Order.
– Re-Set/Delete data of an “Order To Restore”.
– Delete a Trade.
These actions are not taken immediately, but in the next lookup. So you have time to change your mind.
Market Log it’s a very important tab
All the actions taken by the CAT are described inside the LOG.
Different colors are used to help the user read the various actions performed by all the internal CAT Processes.
LOG show only an amount of record according to the CAT Parameter “LIMIT CAT LOG ELEMENTS TO”.
But the full log file is written in CATROOTCATSystemMarketLogs_GENERAL_LOG_.TXT
When an error/problem occurs, you can find the log into the Error Log.
STATUS & STATISTICS
This is only a statistics/info panel.
Here you can have a look at every market’s Ping-Pong completed Cycle. You will have all the info about PING – PONG and Final GAIN Expressed as % and PARTNER-CURRENCY
You will also have a cumulative Gain (Previous Gain + Current Gain)
Gain is Also Written in: CATROOTCATSystemGainLogs_GAIN_.TXT
MARKET EXPLORER TAB
If you want to have a look at the current market status press the “Refresh Status Button” and wait some seconds.
This is the information displayed
– The market’s current orders
– Your current orders
– The market’s last completed trades
– Your last completed trade
With a right-click on one or more (for multiple selection presses the CTRL button) orders, you can open a RESTORE function.
From the restore function you must choose the order type (Ping or Pong) and in the case of a PONG, you must set the Reference Price.
The Prerequisite to restore orders is that the order must be active on the Exchange. There are 2 ways to restore orders:
1.File -> Load Orders (you need to load the XML File previously saved with File -> Save Open Markets Current Orders)
Then you’ll need to choose what to do
A – Restore All Orders And Open Needed Markets: this means that C.A.T. will open all the markets where there’s an order to restore.
B – Ask Me for any Restore: C.A.T. will ask you for any market if you want to restore the orders.
C – Restore Order If Market is Actually Open: You need first to open manually the markets, then only orders associated with open markets will be restored.
2 – From Single Market Panel -> Market Explorer -> Refresh Status -> MyCurrent Buy/Sell Order Table -> Choose Orders (you can use the CTRL button to multiple selection) -> Right Click -> Restore
The same window will appear :
Here you can see
– A Tab for Any Markets (Orders to restore are grouped by market ID)
– Inside any tab a little panel for any order to restore
– A set of a button to apply changes properties to all orders (All Pong/All Buy/All Static/All Dynamic)
– A Button to restore all orders (and start algorithms on markets if they are not running)
In a Single Order To Restore Panel you can get/set info
– Order Id
– The Panel Border could have 3 colors
- Green: order is matched on the Exchange (you can restore the order)
- Yellow: order is matched on the exchange but QTY is changed (you can restore the order)
- Red: order is no more active (you can’t restore that order)
– Status: is the description of what happens during “input orders vs exchange orders matching research algo”
– A Combobox to set Ping/Pong Type
– A Textbox to set the reference price if the order type is a Pong
– A Type Combo to set an order as Static/Dynamic type
You Can Reach Global Gain Panel From the Exchange Toolbar -> DASHBOARD -> GLOBAL GAIN
CAT is able to recognize all the PartnerCurrency from the Market List.
For Any PartnerCurrency a Tab will be added to the Market Global Gain Panel (In the Example BTC and USD)
When a Gain is added to the Market Gain Panel, it will be also added to the Tab at Global Market Gain.
In other words, all the BTC Gain will be put into the Tab BTC
There’s a new Attribute here: Total Cumulative Gain that is the sum of all Market Cumulative Gain.
You can export this table to CSV File.
Very similar to the Status And Statistics Market Panel (You can take a look at the current/cumulative values of all markets at level, in other words, all the BTC/USD/XMR, etc Current Values/Cumulative Values).There’s another panel (shown in the image) that shows you the number of ping-pong completed.
You Can Reach General Console Panel From the Exchange Toolbar -> DASHBOARD -> GENERAL CONSOLE
– General Exchange Log: where various messages could be printed
– API: where API Results will be printed (If Print Option is active) but you can also find error occurs inside the CAT API System.
Logs are also Saved in :