Quicksticks-oss / Rust-TradeOgre-Bot

This trading bot is designed to automate trading on the TradeOgre exchange. It utilizes a sophisticated strategy combining a SSL (Support and Stop Loss) hybrid indicator with a slope indicator for efficient and effective trading decisions. Built in Rust, this bot offers exceptional performance and speed.
MIT License
5 stars 5 forks source link

Not capable to automatized trading and "Invalid market" #6

Open oti5 opened 6 months ago

oti5 commented 6 months ago
 * 2024-03-05 12:01:41 [POSI] : 

$$$$$$$$\                       $$\            $$$$$$\                                      $$$$$$$\             $$\     
\__$$  __|                      $$ |          $$  __$$\                                     $$  __$$\            $$ |    
   $$ | $$$$$$\  $$$$$$\   $$$$$$$ | $$$$$$\  $$ /  $$ | $$$$$$\   $$$$$$\   $$$$$$\        $$ |  $$ | $$$$$$\ $$$$$$\   
   $$ |$$  __$$\ \____$$\ $$  __$$ |$$  __$$\ $$ |  $$ |$$  __$$\ $$  __$$\ $$  __$$\       $$$$$$$\ |$$  __$$\\_$$  _|  
   $$ |$$ |  \__|$$$$$$$ |$$ /  $$ |$$$$$$$$ |$$ |  $$ |$$ /  $$ |$$ |  \__|$$$$$$$$ |      $$  __$$\ $$ /  $$ | $$ |    
   $$ |$$ |     $$  __$$ |$$ |  $$ |$$   ____|$$ |  $$ |$$ |  $$ |$$ |      $$   ____|      $$ |  $$ |$$ |  $$ | $$ |$$\ 
   $$ |$$ |     \$$$$$$$ |\$$$$$$$ |\$$$$$$$\  $$$$$$  |\$$$$$$$ |$$ |      \$$$$$$$\       $$$$$$$  |\$$$$$$  | \$$$$  |
   \__|\__|      \_______| \_______| \_______| \______/  \____$$ |\__|       \_______|      \_______/  \______/   \____/ 
                                                        $$\   $$ |                                                       
                                                        \$$$$$$  |                                                       
                                                         \______/      

                                                    By: Quicksticks-oss             

 * 2024-03-05 12:01:41 [POSI] : Starting TradeOgre Bot...
Saved config to config.toml, use config.toml as the argument to start.
Press Enter to quit...

play@play-GL63-8SD:~/Rust-TradeOgre-Bot$ cargo run config.toml
    Finished dev [unoptimized + debuginfo] target(s) in 0.10s
     Running `target/debug/candlestickdetector config.toml`
 * 2024-03-05 12:07:26 [POSI] : 

$$$$$$$$\                       $$\            $$$$$$\                                      $$$$$$$\             $$\     
\__$$  __|                      $$ |          $$  __$$\                                     $$  __$$\            $$ |    
   $$ | $$$$$$\  $$$$$$\   $$$$$$$ | $$$$$$\  $$ /  $$ | $$$$$$\   $$$$$$\   $$$$$$\        $$ |  $$ | $$$$$$\ $$$$$$\   
   $$ |$$  __$$\ \____$$\ $$  __$$ |$$  __$$\ $$ |  $$ |$$  __$$\ $$  __$$\ $$  __$$\       $$$$$$$\ |$$  __$$\\_$$  _|  
   $$ |$$ |  \__|$$$$$$$ |$$ /  $$ |$$$$$$$$ |$$ |  $$ |$$ /  $$ |$$ |  \__|$$$$$$$$ |      $$  __$$\ $$ /  $$ | $$ |    
   $$ |$$ |     $$  __$$ |$$ |  $$ |$$   ____|$$ |  $$ |$$ |  $$ |$$ |      $$   ____|      $$ |  $$ |$$ |  $$ | $$ |$$\ 
   $$ |$$ |     \$$$$$$$ |\$$$$$$$ |\$$$$$$$\  $$$$$$  |\$$$$$$$ |$$ |      \$$$$$$$\       $$$$$$$  |\$$$$$$  | \$$$$  |
   \__|\__|      \_______| \_______| \_______| \______/  \____$$ |\__|       \_______|      \_______/  \______/   \____/ 
                                                        $$\   $$ |                                                       
                                                        \$$$$$$  |                                                       
                                                         \______/      

                                                    By: Quicksticks-oss             

 * 2024-03-05 12:07:26 [POSI] : Starting TradeOgre Bot...
 * 2024-03-05 12:07:26 [INFO] : Market: NEOX-USDT
 * 2024-03-05 12:07:26 [INFO] : API Sleep: 512
 * 2024-03-05 12:07:26 [INFO] : Max Sticks: 16
 * 2024-03-05 12:07:26 [INFO] : Max Slope Sticks: 5
 * 2024-03-05 12:07:26 [INFO] : Slope Threshold: -10
 * 2024-03-05 12:07:26 [INFO] : Threshold: 0.95
 * 2024-03-05 12:07:26 [POSI] : Cache downloaded or found!
 * 2024-03-05 12:07:26 [MEDI] : Loading vecdb csv data...
 * 2024-03-05 12:07:26 [MEDI] : Initializing Vector DB...
 * 2024-03-05 12:07:42 [POSI] : Vector DB loaded.
 * 2024-03-05 12:07:42 [POSI] : Time taken to query vec db: 8.682055ms
 * 2024-03-05 12:07:42 [MEDI] : Initializing trading API...
 * 2024-03-05 12:07:43 [POSI] : Trading will now begin!
 * 2024-03-05 12:07:43 [POSI] : =========================
 * 2024-03-05 12:07:43 [INFO] : Price: 0.00, Similarities: 0.5774, Slope: 0, Action: hold
 * 2024-03-05 12:19:33 [INFO] : Price: 0.00, Similarities: 0.5000, Slope: 0, Action: buy
 * 2024-03-05 12:22:35 [INFO] : Price: 0.00, Similarities: 0.6325, Slope: -0, Action: hold
 * 2024-03-05 12:31:43 [INFO] : Price: 0.00, Similarities: 0.6325, Slope: 0, Action: buy
 * 2024-03-05 12:32:45 [INFO] : Price: 0.00, Similarities: 0.7071, Slope: -0, Action: hold
 * 2024-03-05 12:38:53 [INFO] : Price: 0.00, Similarities: 0.7746, Slope: -0, Action: buy
 * 2024-03-05 12:39:53 [INFO] : Price: 0.00, Similarities: 0.7746, Slope: -0, Action: buy
 * 2024-03-05 13:01:11 [INFO] : Price: 0.00, Similarities: 0.7559, Slope: -0, Action: hold
 * 2024-03-05 13:03:13 [INFO] : Price: 0.00, Similarities: 0.8165, Slope: -0, Action: hold
 * 2024-03-05 13:04:15 [INFO] : Price: 0.00, Similarities: 0.8165, Slope: -0, Action: hold
 * 2024-03-05 13:06:15 [INFO] : Price: 0.00, Similarities: 0.8944, Slope: -0, Action: buy
 * 2024-03-05 13:21:29 [INFO] : Price: 0.00, Similarities: 0.8452, Slope: -0, Action: buy
 * 2024-03-05 13:38:45 [INFO] : Price: 0.00, Similarities: 0.8452, Slope: -0, Action: buy
 * 2024-03-05 14:11:12 [INFO] : Price: 0.00, Similarities: 0.8660, Slope: -0, Action: hold
 * 2024-03-05 14:47:43 [INFO] : Price: 0.00, Similarities: 0.8819, Slope: -0, Action: buy
 * 2024-03-05 14:56:51 [INFO] : Price: 0.00, Similarities: 0.8819, Slope: 0, Action: hold
 * 2024-03-05 15:13:07 [INFO] : Price: 0.00, Similarities: 0.8819, Slope: 0, Action: buy
 * 2024-03-05 15:24:15 [INFO] : Price: 0.00, Similarities: 0.9354, Slope: 0, Action: hold
 * 2024-03-05 15:30:21 [INFO] : Price: 0.00, Similarities: 0.8660, Slope: 0, Action: buy
 * 2024-03-05 15:45:34 [INFO] : Price: 0.00, Similarities: 0.8819, Slope: 0, Action: buy
 * 2024-03-05 16:12:59 [INFO] : Price: 0.00, Similarities: 0.8660, Slope: -0, Action: buy
 * 2024-03-05 16:20:06 [INFO] : Price: 0.00, Similarities: 0.8333, Slope: -0, Action: buy
 * 2024-03-05 16:30:14 [INFO] : Price: 0.00, Similarities: 0.8571, Slope: -0, Action: buy
 * 2024-03-05 16:45:28 [INFO] : Price: 0.00, Similarities: 0.8333, Slope: -0, Action: hold
 * 2024-03-05 16:54:35 [INFO] : Price: 0.00, Similarities: 0.8571, Slope: -0, Action: buy
 * 2024-03-05 16:56:37 [INFO] : Price: 0.00, Similarities: 0.8819, Slope: 0, Action: buy
 * 2024-03-05 16:57:37 [INFO] : Price: 0.00, Similarities: 0.8819, Slope: -0, Action: hold
 * 2024-03-05 17:05:46 [INFO] : Price: 0.00, Similarities: 0.8819, Slope: -0, Action: buy
Request failed: error sending request for url (https://tradeogre.com/api/v1/ticker/NEOX-USDT): error trying to connect: Connection reset by peer (os error 104). Attempt 1 of 5
 * 2024-03-05 17:56:48 [INFO] : Price: 0.00, Similarities: 0.8571, Slope: -0, Action: buy
 * 2024-03-05 18:03:38 [INFO] : Price: 0.00, Similarities: 0.8819, Slope: -0, Action: hold
 * 2024-03-05 18:20:52 [INFO] : Price: 0.00, Similarities: 0.9354, Slope: -0, Action: buy
 * 2024-03-05 18:33:02 [INFO] : Price: 0.00, Similarities: 0.9258, Slope: 0, Action: hold
^C
play@play-GL63-8SD:~/Rust-TradeOgre-Bot$ cargo run config.toml
    Finished dev [unoptimized + debuginfo] target(s) in 0.08s
     Running `target/debug/candlestickdetector config.toml`
 * 2024-03-05 18:39:07 [POSI] : 

$$$$$$$$\                       $$\            $$$$$$\                                      $$$$$$$\             $$\     
\__$$  __|                      $$ |          $$  __$$\                                     $$  __$$\            $$ |    
   $$ | $$$$$$\  $$$$$$\   $$$$$$$ | $$$$$$\  $$ /  $$ | $$$$$$\   $$$$$$\   $$$$$$\        $$ |  $$ | $$$$$$\ $$$$$$\   
   $$ |$$  __$$\ \____$$\ $$  __$$ |$$  __$$\ $$ |  $$ |$$  __$$\ $$  __$$\ $$  __$$\       $$$$$$$\ |$$  __$$\\_$$  _|  
   $$ |$$ |  \__|$$$$$$$ |$$ /  $$ |$$$$$$$$ |$$ |  $$ |$$ /  $$ |$$ |  \__|$$$$$$$$ |      $$  __$$\ $$ /  $$ | $$ |    
   $$ |$$ |     $$  __$$ |$$ |  $$ |$$   ____|$$ |  $$ |$$ |  $$ |$$ |      $$   ____|      $$ |  $$ |$$ |  $$ | $$ |$$\ 
   $$ |$$ |     \$$$$$$$ |\$$$$$$$ |\$$$$$$$\  $$$$$$  |\$$$$$$$ |$$ |      \$$$$$$$\       $$$$$$$  |\$$$$$$  | \$$$$  |
   \__|\__|      \_______| \_______| \_______| \______/  \____$$ |\__|       \_______|      \_______/  \______/   \____/ 
                                                        $$\   $$ |                                                       
                                                        \$$$$$$  |                                                       
                                                         \______/      

                                                    By: Quicksticks-oss             

 * 2024-03-05 18:39:07 [POSI] : Starting TradeOgre Bot...
 * 2024-03-05 18:39:07 [INFO] : Market: NEOX-USDT
 * 2024-03-05 18:39:07 [INFO] : API Sleep: 512
 * 2024-03-05 18:39:07 [INFO] : Max Sticks: 16
 * 2024-03-05 18:39:07 [INFO] : Max Slope Sticks: 5
 * 2024-03-05 18:39:07 [INFO] : Slope Threshold: -10
 * 2024-03-05 18:39:07 [INFO] : Threshold: 0.95
 * 2024-03-05 18:39:07 [POSI] : Cache downloaded or found!
 * 2024-03-05 18:39:07 [MEDI] : Loading vecdb csv data...
 * 2024-03-05 18:39:07 [MEDI] : Initializing Vector DB...
 * 2024-03-05 18:39:21 [POSI] : Vector DB loaded.
 * 2024-03-05 18:39:21 [POSI] : Time taken to query vec db: 8.339193ms
 * 2024-03-05 18:39:21 [MEDI] : Initializing trading API...
 * 2024-03-05 18:39:21 [POSI] : Trading will now begin!
 * 2024-03-05 18:39:21 [POSI] : =========================
 * 2024-03-05 18:39:22 [INFO] : Price: 0.00, Similarities: 0.5774, Slope: 0, Action: hold
 * 2024-03-05 18:41:09 [INFO] : Price: 0.00, Similarities: 0.7071, Slope: 0, Action: hold
 * 2024-03-05 18:43:09 [INFO] : Price: 0.00, Similarities: 0.7746, Slope: 0, Action: hold
 * 2024-03-05 18:44:11 [INFO] : Price: 0.00, Similarities: 0.7746, Slope: 0, Action: hold
 * 2024-03-05 18:45:11 [INFO] : Price: 0.00, Similarities: 0.7746, Slope: 0, Action: buy
 * 2024-03-05 18:48:15 [INFO] : Price: 0.00, Similarities: 0.8944, Slope: 0, Action: buy
 * 2024-03-05 18:51:17 [INFO] : Price: 0.00, Similarities: 0.8944, Slope: 0, Action: buy
 * 2024-03-05 18:53:19 [INFO] : Price: 0.00, Similarities: 0.8333, Slope: 0, Action: hold
 * 2024-03-05 18:55:19 [INFO] : Price: 0.00, Similarities: 0.8165, Slope: 0, Action: buy
 * 2024-03-05 18:57:21 [INFO] : Price: 0.00, Similarities: 0.8819, Slope: 0, Action: buy
 * 2024-03-05 19:13:35 [INFO] : Price: 0.00, Similarities: 0.9354, Slope: 0, Action: buy
 * 2024-03-05 19:18:39 [INFO] : Price: 0.00, Similarities: 0.8750, Slope: -0, Action: buy
 * 2024-03-05 19:24:45 [INFO] : Price: 0.00, Similarities: 0.8750, Slope: -0, Action: buy
 * 2024-03-05 19:26:47 [INFO] : Price: 0.00, Similarities: 0.9045, Slope: -0, Action: buy
 * 2024-03-05 19:33:53 [INFO] : Price: 0.00, Similarities: 0.9000, Slope: -0, Action: buy
 * 2024-03-05 19:34:53 [INFO] : Price: 0.00, Similarities: 0.9199, Slope: -0, Action: buy
 * 2024-03-05 19:53:08 [INFO] : Price: 0.00, Similarities: 0.9535, Slope: -0, Action: hold
 * 2024-03-05 19:53:08 [INFO] : Trades: 0, Balance: 60.00, Ride: 60.58
 * 2024-03-05 19:53:08 [MEDI] : Holding NEOX-USDT at price 0.00!
 * 2024-03-05 19:55:10 [INFO] : Price: 0.00, Similarities: 0.9535, Slope: 0, Action: sell
 * 2024-03-05 19:55:10 [INFO] : Trades: 1, Balance: 60.00, Ride: 60.66
 * 2024-03-05 19:55:10 [NEGA] : Selling NEOX-USDT at price 0.00!
 * 2024-03-05 19:55:10 [NEGA] : {"error":"Invalid market","success":false},"25.00540426"
 * 2024-03-05 19:56:12 [INFO] : Price: 0.00, Similarities: 0.9487, Slope: 0, Action: buy
 * 2024-03-05 20:04:18 [INFO] : Price: 0.00, Similarities: 0.9428, Slope: -0, Action: sell
 * 2024-03-05 20:08:22 [INFO] : Price: 0.00, Similarities: 0.9487, Slope: -0, Action: sell
 * 2024-03-05 20:13:27 [INFO] : Price: 0.00, Similarities: 0.9045, Slope: -0, Action: buy
 * 2024-03-05 20:17:29 [INFO] : Price: 0.00, Similarities: 0.8944, Slope: -0, Action: buy
 * 2024-03-05 20:31:43 [INFO] : Price: 0.00, Similarities: 0.9258, Slope: -0, Action: buy
 * 2024-03-05 20:39:51 [INFO] : Price: 0.00, Similarities: 0.8819, Slope: -0, Action: sell
 * 2024-03-05 20:40:52 [INFO] : Price: 0.00, Similarities: 0.8819, Slope: -0, Action: sell
 * 2024-03-05 20:54:04 [INFO] : Price: 0.00, Similarities: 0.8819, Slope: -0, Action: sell
^C
play@play-GL63-8SD:~/Rust-TradeOgre-Bot$ cargo run config.toml
    Finished dev [unoptimized + debuginfo] target(s) in 0.08s
     Running `target/debug/candlestickdetector config.toml`
 * 2024-03-05 20:58:36 [POSI] : 

$$$$$$$$\                       $$\            $$$$$$\                                      $$$$$$$\             $$\     
\__$$  __|                      $$ |          $$  __$$\                                     $$  __$$\            $$ |    
   $$ | $$$$$$\  $$$$$$\   $$$$$$$ | $$$$$$\  $$ /  $$ | $$$$$$\   $$$$$$\   $$$$$$\        $$ |  $$ | $$$$$$\ $$$$$$\   
   $$ |$$  __$$\ \____$$\ $$  __$$ |$$  __$$\ $$ |  $$ |$$  __$$\ $$  __$$\ $$  __$$\       $$$$$$$\ |$$  __$$\\_$$  _|  
   $$ |$$ |  \__|$$$$$$$ |$$ /  $$ |$$$$$$$$ |$$ |  $$ |$$ /  $$ |$$ |  \__|$$$$$$$$ |      $$  __$$\ $$ /  $$ | $$ |    
   $$ |$$ |     $$  __$$ |$$ |  $$ |$$   ____|$$ |  $$ |$$ |  $$ |$$ |      $$   ____|      $$ |  $$ |$$ |  $$ | $$ |$$\ 
   $$ |$$ |     \$$$$$$$ |\$$$$$$$ |\$$$$$$$\  $$$$$$  |\$$$$$$$ |$$ |      \$$$$$$$\       $$$$$$$  |\$$$$$$  | \$$$$  |
   \__|\__|      \_______| \_______| \_______| \______/  \____$$ |\__|       \_______|      \_______/  \______/   \____/ 
                                                        $$\   $$ |                                                       
                                                        \$$$$$$  |                                                       
                                                         \______/      

                                                    By: Quicksticks-oss             

 * 2024-03-05 20:58:36 [POSI] : Starting TradeOgre Bot...
 * 2024-03-05 20:58:36 [INFO] : Market: FLUX-USDT
 * 2024-03-05 20:58:36 [INFO] : API Sleep: 512
 * 2024-03-05 20:58:36 [INFO] : Max Sticks: 16
 * 2024-03-05 20:58:36 [INFO] : Max Slope Sticks: 5
 * 2024-03-05 20:58:36 [INFO] : Slope Threshold: -10
 * 2024-03-05 20:58:36 [INFO] : Threshold: 0.95
 * 2024-03-05 20:58:36 [POSI] : Cache downloaded or found!
 * 2024-03-05 20:58:36 [MEDI] : Loading vecdb csv data...
 * 2024-03-05 20:58:36 [MEDI] : Initializing Vector DB...
 * 2024-03-05 20:58:51 [POSI] : Vector DB loaded.
 * 2024-03-05 20:58:51 [POSI] : Time taken to query vec db: 9.173129ms
 * 2024-03-05 20:58:51 [MEDI] : Initializing trading API...
 * 2024-03-05 20:58:51 [POSI] : Trading will now begin!
 * 2024-03-05 20:58:51 [POSI] : =========================
 * 2024-03-05 20:58:52 [INFO] : Price: 0.93, Similarities: 0.5774, Slope: 0, Action: hold
 * 2024-03-05 21:13:20 [INFO] : Price: 0.94, Similarities: 0.7071, Slope: 0, Action: hold
 * 2024-03-05 21:18:24 [INFO] : Price: 0.94, Similarities: 0.6325, Slope: 0, Action: buy
 * 2024-03-05 21:21:28 [INFO] : Price: 0.96, Similarities: 0.7746, Slope: 0, Action: hold
 * 2024-03-05 22:41:36 [INFO] : Price: 0.96, Similarities: 0.7746, Slope: 0, Action: hold
 * 2024-03-05 22:48:43 [INFO] : Price: 0.93, Similarities: 0.7746, Slope: 0, Action: buy
 * 2024-03-06 00:07:49 [INFO] : Price: 0.94, Similarities: 0.8165, Slope: -0, Action: buy
 * 2024-03-06 00:32:09 [INFO] : Price: 0.95, Similarities: 0.8452, Slope: -0, Action: hold
 * 2024-03-06 01:55:18 [INFO] : Price: 0.92, Similarities: 0.8452, Slope: -0, Action: hold
 * 2024-03-06 02:01:24 [INFO] : Price: 0.92, Similarities: 0.9129, Slope: -0, Action: buy
 * 2024-03-06 02:10:30 [INFO] : Price: 0.92, Similarities: 0.8660, Slope: -0, Action: hold
 * 2024-03-06 02:56:08 [INFO] : Price: 0.91, Similarities: 0.9129, Slope: -0, Action: buy
 * 2024-03-06 03:18:26 [INFO] : Price: 0.92, Similarities: 0.9258, Slope: -0, Action: buy
 * 2024-03-06 03:38:50 [INFO] : Price: 0.92, Similarities: 0.8571, Slope: -0, Action: hold
 * 2024-03-06 04:18:22 [INFO] : Price: 0.91, Similarities: 0.8571, Slope: -0, Action: buy
 * 2024-03-06 04:19:24 [INFO] : Price: 0.93, Similarities: 0.8944, Slope: -0, Action: buy
 * 2024-03-06 04:23:26 [INFO] : Price: 0.90, Similarities: 0.8571, Slope: 0, Action: buy
 * 2024-03-06 05:12:04 [INFO] : Price: 0.95, Similarities: 0.8819, Slope: -0, Action: buy
 * 2024-03-06 05:15:06 [INFO] : Price: 0.95, Similarities: 0.8750, Slope: 0, Action: buy
 * 2024-03-06 05:59:43 [INFO] : Price: 0.96, Similarities: 0.9354, Slope: 0, Action: hold
 * 2024-03-06 06:00:43 [INFO] : Price: 0.97, Similarities: 0.9428, Slope: 0, Action: hold
 * 2024-03-06 08:18:30 [INFO] : Price: 0.98, Similarities: 0.9487, Slope: 0, Action: hold
Request failed: error sending request for url (https://tradeogre.com/api/v1/ticker/FLUX-USDT): connection error: Connection reset by peer (os error 104). Attempt 1 of 5
 * 2024-03-06 10:33:16 [INFO] : Price: 0.97, Similarities: 0.9428, Slope: 0, Action: buy
 * 2024-03-06 10:41:24 [INFO] : Price: 0.95, Similarities: 1.0000, Slope: 0, Action: buy
 * 2024-03-06 10:41:24 [POSI] : Trades: 0, Balance: 60.00, Ride: 60.84
 * 2024-03-06 10:41:24 [POSI] : Purchased FLUX-USDT at price 0.95!
 * 2024-03-06 10:41:26 [POSI] : {"error":"Invalid market","success":false}, 20.23099, Quant: 20.23099
 * 2024-03-06 11:21:54 [INFO] : Price: 0.97, Similarities: 1.0000, Slope: -0, Action: buy
 * 2024-03-06 12:13:35 [INFO] : Price: 0.97, Similarities: 1.0000, Slope: -0, Action: buy
whatevertrademark commented 5 months ago

That seems an issue with the exchange API. Have you tried again?