how to extract the price of my last trade?

I am using node-binance-api
the follwoing function bring me all details of my last order:

binance.trades(“BNBUSD”, (error, trades, symbol) => {
console.info(symbol+" last order:", trades);
}, {limit:1});

How can extract only a the price and sign it up for a variable?

Thanks,

Wrong symbol should be BNBUSDT

OK what about extracting only the price ?
I get too much details:

{
symbol: ‘BNBUSD’,
id: -------,
orderId:-----------,
orderListId: -1,
price: ‘-----------’,
qty: ‘---------’,
quoteQty: ‘------’,
commission: ‘0.00105000’,
commissionAsset: ‘BNB’,
time: ----------,
isBuyer: true,
isMaker: false,
isBestMatch: true
}
]

Have you read what I posted? Wrong symbol…

Hello, I am having the same issue trying to get the price out of the function. It says undefined because if I’m correct it returns a promise. I’m still a bit new to promises so if you could help me getting the number so I can use it elsewhere it would really help. Btw I’m able to show it on a console.log() (the number alone), I’m trying it with ‘XRPUSDT’ and using “binance.allOrders()” limited to 1.

Different case. Please open a new topic and share your code and the output for analysis