Get monthly cost of a project using the public API

Hello, is it possibly to query the current monthly cost of a project in the current billing cycle using your API? I found the usage property which however only returns i.e. the memory GBs used, not the resulting cost? So is it possible to get the cost of a project or maybe the current pricing i.e. ($0.000463 / vCPU / minute) using the API? Thank you in advance!
No description
8 Replies
Percy
Percy11mo ago
Project ID: N/A
Brody
Brody11mo ago
you would need to do the math in your code
UDSSR Dolphin
UDSSR DolphinOP11mo ago
What do you mean by "math"? I mean you probably mean multiplying the usage by the cost, I understand. Yet, I need to query the cost per unit, if you know what I mean. Because else, if Railway changes their pricing, my code calculates the incorrect cost.
Brody
Brody11mo ago
yes would would need to do all the same math that railway's dashboard does, multiplying the usage by the charge rate for every resource type, then summing that all up
UDSSR Dolphin
UDSSR DolphinOP11mo ago
Exactly! But how do I get the charge rate for every resource type? I mean it could change over time, right?
Brody
Brody11mo ago
railway has the charge rate hardcoded in their dashboard's code as far as i can tell, there is no query to get the charge rate for a given resource type
UDSSR Dolphin
UDSSR DolphinOP11mo ago
Ok that's a bummer. But thank you for your support!
Brody
Brody11mo ago
no problem!
Want results from more Discord servers?
Add your server