From 9d2082d985a9356dbbbbe7287ca975dc5929cf9e Mon Sep 17 00:00:00 2001 From: Jun Su Date: Wed, 15 Jun 2022 18:55:51 +0800 Subject: [PATCH] mock queryStrategiesMetrics --- frontend/api/bbgo.ts | 28 ++++++++++++++++++++++++++++ 1 file changed, 28 insertions(+) diff --git a/frontend/api/bbgo.ts b/frontend/api/bbgo.ts index 195437f3b..9a54cdf37 100644 --- a/frontend/api/bbgo.ts +++ b/frontend/api/bbgo.ts @@ -130,3 +130,31 @@ export function queryTradingVolume(params, cb) { cb(response.data.tradingVolumes || []); }); } + +export async function queryStrategiesMetrics() { + return ( + [ + { + "id":"uuid", + "instanceID": "testInstanceID", + "strategy": "grid", + "grid": { + "symbol": "BTCUSDT", + }, + "stats": { + "oneDayArbs": 0, + "totalArbs": 3, + "investment": 100, + "totalProfits": 5.6, + "gridProfits": 2.5, + "floatingPNL": 3.1, + "currentPrice": 29000, + "lowestPrice": 25000, + "highestPrice": 35000 + }, + "status": "RUNNING", + "startTime": 1654938187102 + } + ] + ) +} \ No newline at end of file