|
@@ -232,14 +232,17 @@
|
|
|
(:roi . ,roi)
|
|
(:roi . ,roi)
|
|
|
(:annual . ,annual)))))
|
|
(:annual . ,annual)))))
|
|
|
|
|
|
|
|
-(defun print-order-info (info)
|
|
|
|
|
- (format nil "~A ~A ~A ~A @ ~$ - ~A @ ~$, заработал ~$, ROI ~$%"
|
|
|
|
|
|
|
+(defun print-order-info (idx info)
|
|
|
|
|
+ (format nil "~A) @~A: *~A* ~A _~A_ @ *~$* ~A _~A_ @ *~$*, заработал *~$*, ROI *~$*%"
|
|
|
|
|
+ idx
|
|
|
(agets info :user-name)
|
|
(agets info :user-name)
|
|
|
(agets info :amount)
|
|
(agets info :amount)
|
|
|
(get-symbol-label (agets info :symbol))
|
|
(get-symbol-label (agets info :symbol))
|
|
|
(format-ts (local-time:unix-to-timestamp (agets info :open-at)))
|
|
(format-ts (local-time:unix-to-timestamp (agets info :open-at)))
|
|
|
(agets info :open)
|
|
(agets info :open)
|
|
|
- (if (agets info :open-p) "now" (format-ts (local-time:unix-to-timestamp (agets info :close-at))))
|
|
|
|
|
|
|
+ (if (> (agets info :income) 0) "📉 " "📉")
|
|
|
|
|
+ (if (agets info :open-p) "now"
|
|
|
|
|
+ (format-ts (local-time:unix-to-timestamp (agets info :close-at))))
|
|
|
(agets info :close)
|
|
(agets info :close)
|
|
|
(agets info :income)
|
|
(agets info :income)
|
|
|
(* 100 (agets info :roi))))
|
|
(* 100 (agets info :roi))))
|
|
@@ -247,10 +250,11 @@
|
|
|
(def-message-cmd-handler handle-hodl (:hodl :hodlers)
|
|
(def-message-cmd-handler handle-hodl (:hodl :hodlers)
|
|
|
(let ((orders (db/orders-get chat-id)))
|
|
(let ((orders (db/orders-get chat-id)))
|
|
|
(bot-send-message chat-id
|
|
(bot-send-message chat-id
|
|
|
- (if orders (format nil "~{~A~^~%~}"
|
|
|
|
|
- (loop for order in orders
|
|
|
|
|
- collect (print-order-info (get-order-info order))))
|
|
|
|
|
- "Нет ходлеров :("))))
|
|
|
|
|
|
|
+ (if orders (format nil "{~A~^~%~}~%😇~"
|
|
|
|
|
+ (loop for order in orders for idx from 1
|
|
|
|
|
+ collect (print-order-info idx (get-order-info order))))
|
|
|
|
|
+ "Нет ходлеров :(")
|
|
|
|
|
+ :parse-mode "markdown")))
|
|
|
|
|
|
|
|
(def-message-cmd-handler handler-charts (:charts)
|
|
(def-message-cmd-handler handler-charts (:charts)
|
|
|
(telegram-send-chat-action chat-id "upload_photo")
|
|
(telegram-send-chat-action chat-id "upload_photo")
|