Know the amount of fuel remaining in a vehicle’s tank.
Read the percentage of fuel remaining in the tank.
Access the estimated distance the vehicle can travel with its current fuel tank level.
const smartcar = require('smartcar');
// Get all vehicles associated with this access token
const {vehicles} = await smartcar.getVehicleIds("<access-token>");
// Construct a new vehicle instance using the first vehicle's id
const vehicle = new smartcar.Vehicle(vehicles[0], "<access-token>");
// Fetch the vehicle's fuel tank level
const fuel = await vehicle.fuel();
console.log(fuel);
// Example response from Smartcar
{
"amountRemaining": 53.2,
"percentRemaining": 0.3,
"range": 40.5
}
API SDKs in Node.js, Python, Java, and Go
Compatible with 15 brands
Access to live data
Batch requests
No aftermarket hardware