MockHero

decimal

Business

Generate decimal floating-point numbers within a configurable range and precision. For any numeric field that needs fractional values.

Example Outputs

42.50.75100.1233.14159

Parameters

ParameterDescription
minMinimum value
maxMaximum value
precisionDecimal places

API Usage

Send a POST request to generate decimal data:

curl -X POST https://mockhero.dev/api/v1/generate \
  -H "Authorization: Bearer YOUR_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
  "tables": [
    {
      "name": "example",
      "count": 5,
      "fields": [
        {
          "name": "decimal",
          "type": "decimal",
          "params": {
            "min": 1,
            "max": 100
          }
        }
      ]
    }
  ]
}'

Common Use Cases

  • Scientific data
  • Measurement fields
  • Percentage values
  • Calculation testing

Quick Info

Field Type
decimal
Category
Business
Parameters
3 parameters
Output Format
JSON, CSV, SQL

Try it now

Generate decimal data instantly in the playground.

Generate Decimal + 155 more types via API

One API call. Multiple tables. Relational integrity. Free tier included.

Get Started Free