client.firearms.calculate()
Calculate ballistics for a firearm with specific ammunition.
calculate(id: string, params: CalculateBallisticsParams): Promise<APIResponse<FirearmCalculation>>- stringheaderrequired
Your API key.
Authorization: Bearer <key>is accepted in its place.
- stringrequired
Resource slug ID
- Accepts
- a lowercase slug: letters, digits and hyphens
- Example
- stringrequired
Ammunition load to fire
- Max length
- 255
- Example
- object
Muzzle solution adjusted for this firearm barrel length, against its published figures.
- BallisticsFirearm
The firearm the solution was computed for.
barrelLengthMmis absent when the firearm has no recorded barrel. - string
URL-safe slug identifying the firearm, e.g.
glock-17-gen5. - string
Display name, as the maker writes it.
- number
Barrel length in millimetres, measured from the breech face.
- object
The load the calculation used.
- string
Slug of the ammunition load that was fired.
- string
Display name, as the maker writes it.
- object
The figures derived for the barrel length asked about, rather than the reference one.
- number
Muzzle velocity in metres per second, for the default load.
- number
Muzzle energy in joules, for the default load.
- TerminalBallistics
Terminal performance indices computed at the muzzle.
- object
The figures published for this firearm, where the catalog records them.
- number | null
Muzzle velocity in metres per second, for the default load.
- number | null
Muzzle energy in joules, for the default load.
- object
Computed minus source-reported. Null where no source figure exists to compare against.
- number | null
Remaining velocity at this distance, in metres per second.
- number | null
Remaining energy at this distance, in joules.
- string | null
Why the calculation could not be completed, or null when it succeeded.
- 400
VALIDATION_ERROR - 401
UNAUTHORIZED - 403
FORBIDDEN - 404
NOT_FOUND - 429
RATE_LIMITED - 500
INTERNAL_ERROR
- Minimum tier
- Builder+
- Monthly quota
- 25,000/mo
- Rate limit
- 60/min
- Daily cap
- 2,000
Figures shown are for this endpoint's minimum tier. Higher tiers raise every limit.