How to access the list of volume grids using python?
Recommend use the python console to figure out the path, especially for new and undocumented properties. ObjectData.grids collection holds all the data (fields) you're searching for:

&gt;&gt;&gt; C.object.data.grids.items()
[(0, bpy.data.volumes['Object_Name']...VolumeGrid),
 (1, bpy.data.volumes['Object_Name']...VolumeGrid),
 (2, bpy.data.volumes['Object_Name']...VolumeGrid),
 ...


To get the name for each field, use a for-loop:

&gt;&gt;&gt; for field in C.object.data.grids:
...    print (field.name)
...
density
fuel
heat
temperature
vel.x
vel.y
vel.z 


Or a list comprehension to collect the names for your shader setup:

&gt;&gt;&gt; [field.name for field in C.object.data.grids]
['density', 'fuel', 'heat', 'temperature', 'vel.x', 'vel.y', 'vel_z']


Example script on how to check whether there is a certain field (density, fuel, heat etc.):

import bpy

C = bpy.context

for field in C.object.data.grids:
    if field.name == "density":
        print ("Got density")
    else:
        print ("No density field")