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!
8 Replies
Project ID:
N/A
you would need to do the math in your code
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.
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
Exactly! But how do I get the charge rate for every resource type? I mean it could change over time, right?
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
Ok that's a bummer. But thank you for your support!
no problem!