rewrite ^/accounts/([^/]+)/delegations /rpc/get_balance_delegations?account-name=$1 break;
# endpoint for get /accounts/{account-name}/delegations

rewrite ^/accounts/([^/]+)/aggregated-history /rpc/get_balance_aggregation?account-name=$1 break;
# endpoint for get /accounts/{account-name}/aggregated-history

rewrite ^/accounts/([^/]+)/balance-history /rpc/get_balance_history?account-name=$1 break;
# endpoint for get /accounts/{account-name}/balance-history

rewrite ^/accounts/([^/]+)/balances /rpc/get_account_balances?account-name=$1 break;
# endpoint for get /accounts/{account-name}/balances

rewrite ^/$ / break;
# endpoint for openapi spec itself

rewrite ^/(.*)$ /rpc/$1 break;
# default endpoint for everything else
