我无法按时间获取价格{“ asset”:“ EURUSD”,“ price”:“”,“ time”:“”}
<?php
$manager = new MongoDB\Driver\Manager("mongodb://localhost:27017");
$db = $_GET['db'];
$table = $_GET['plateform'];
$asset = $_GET['asset'];
$timestamp = $_GET['timestamp'];
$filter = ['asset' => $asset, 'epoch' => ['$lte' => $timestamp ]];
$options = [
'sort' => ['_id' => -1],
'limit'=>1
];
.....
?>