How to programmatically check if outbound transfer limit was reached?

I would like a way to detect if my monthly outbound transfer limit was reached, either via an automated action or an API call. My ultimate goal is to detect when this limit is reached and then automatically shut down my API (it is not critical, and I’d rather it be unavailable than racking up extra charges).

As far as I can tell from checking this forum and the API docs, there is currently no way to do this. One endpoint I toyed with was v2/monitoring/metrics/droplet/bandwidth, but this is not the same thing as outbound transfer.

I know that the chance of me hitting my limit is small (I usually don’t get anywhere close to it), but it just makes me uneasy to think that the only thing standing between me and financial ruin is a script that continuously calls my API, so I’d rather be safe than sorry.

I have a billing alert set to $1 above my expected monthly charges so I can manually respond ASAP if needed, but I would rather have a mechanism to shut it down immediately if possible, just for my own peace of mind.

Submit an answer

This textbox defaults to using Markdown to format your answer.

You can type !ref in this text area to quickly search our full set of tutorials, documentation & marketplace offerings and insert the link!

Sign In or Sign Up to Answer

These answers are provided by our Community. If you find them useful, show some love by clicking the heart. If you run into issues leave a comment, or add your own answer to help others.

Bobby Iliev
Site Moderator
Site Moderator badge
October 26, 2022

Hey @frankkulak,

The best thing to do to get your voice heard regarding this would be to head over to our Product Ideas board and post a new idea, including as much information as possible for what you’d like to see implemented.

Hope that helps!

- Bobby.

Try DigitalOcean for free

Click below to sign up and get $200 of credit to try our products over 60 days!

Sign up

card icon
Get our biweekly newsletter

Sign up for Infrastructure as a Newsletter.

Sign up
card icon
Hollie's Hub for Good

Working on improving health and education, reducing inequality, and spurring economic growth? We’d like to help.

Learn more
card icon
Become a contributor

You get paid; we donate to tech nonprofits.

Learn more
Welcome to the developer cloud

DigitalOcean makes it simple to launch in the cloud and scale up as you grow – whether you’re running one virtual machine or ten thousand.

Learn more ->
DigitalOcean Cloud Control Panel
Get started for free

Enter your email to get $200 in credit for your first 60 days with DigitalOcean.

New accounts only. By submitting your email you agree to our Privacy Policy.

© 2023 DigitalOcean, LLC.