For this API: https://developers.binary.com/api/#buy_contract_for_multiple_accounts
How to send a contract with amount x % of each account balance?
"contract with amount x% each account balance" seems you are working on the project for commercial use.
Anyway there is no restrictions on what you are developing and what it's purpose but at the point binary.com haven't provided any services to do this, so you may focus on finding out another ways like "copy trading" or execute multiple functions at a time for each individual accounts.
I'll suggest you to use "MAP".
If you are not familiar with the term map, just google it for "how to use" there are lot's of stuffs available to learn this.
Please press like button if you agree me...