how to get animtion total frame and animation frame rate in C++ code

hi guys , i am wroking in animation in c++ code , i wanna to get animation total frame , but i can not find any api , could someone tell me how to get it? thx!
PS: i also want to get animation frame rate in runtime c++ thx again