/Engine/Source/Runtime/AnimGraphRuntime/Public/KismetAnimationLibrary.h
This function calculates the velocity of an offset position on a bone / socket over time. The bone's / socket's motion can be expressed within a reference frame (another bone / socket). You need to hook up a valid PositionHistory variable to this for storage.
static float K2_CalculateVelocityFromSockets ( float DeltaSeconds, [USkeletalMeshComponent](API\Runtime\Engine\Components\USkeletalMeshComponent) * Component, const [FName](API\Runtime\Core\UObject\FName) SocketOrBoneName, const [FName](API\Runtime\Core\UObject\FName) ReferenceSocketOrBone, ERelativeTransformSpace SocketSpace, FVector OffsetInBoneSpace, [FPositionHistory](API\Runtime\AnimGraphRuntime\FPositionHistory) & History, int32 NumberOfSamples, float VelocityMin, float VelocityMax, EEasingFuncType EasingType, const [FRuntimeFloatCurve](API\Runtime\Engine\Curves\FRuntimeFloatCurve) & CustomCurve )