Add `get-all-market-details` function
Added helper for safely converting strings to numbers

The built in `string-to-number` will cause an error when being passed a
number. Added a safe conversion method that will only convert the
value if it is a string.
Updated `get-all-market-details` to convert fields to numbers

Some fields are returned from the API as strings, but should be
numbers. Added extra code to do the conversion.