Skip to content

Request access

Tell us about your processing, and we'll reply by email.

API reference

Account

Your gas wallet and its balance on each chain, the payouts of its available balance, your tariff, your settings and the monthly report. How the report is counted: Monthly report; how a payout works: Fees.

GET/v1/balance

Your gas wallet and its balance and fees on each chain. The gas wallet is one address on every chain. Fees due (fees_due) stay on it in reserve and are not spent on gas; available is what is left for gas.

StatusDescription
200The balance on each chain. Returns Balance.
401unauthorized: no API key, an unknown one or a revoked one.
403partner_disabled: your account is disabled.
Terminal window
curl "https://api-testnet.portuna.io/v1/balance" \
-H "Authorization: Bearer $PORTUNA_API_KEY"
200 OK
{
"gas_wallet": "0xf0259b04f5D336E624A84780d1B365fAFc3f5A85",
"chains": [
{
"chain_id": 97,
"name": "bsc-testnet",
"native": "BNB",
"balance": "100000000000000000",
"fees_accrued": "0",
"fees_withdrawn": "0",
"fees_due": "0",
"available": "100000000000000000"
},
{
"chain_id": 11155111,
"name": "sepolia",
"native": "ETH",
"balance": "48712400000000000",
"fees_accrued": "23358000000000",
"fees_withdrawn": "0",
"fees_due": "23358000000000",
"available": "48689042000000000"
}
]
}

GET/v1/tariff

Your rates on each chain and the conventional costs your fees are computed with. The fee for a token sweep is max(0, X × conventional cost of the token − gas of the sweep). X is rate_bps for the base tokens Portuna lists, and for a token you added yourself 80% by default (custom_tokens), unless Portuna agreed another rate with you for all your tokens on the chain or for one of them. Every token has its own conventional cost, the gas of a conventional sweep: the top-up of a deposit address plus a plain transfer of the token’s whole balance from it; for a token you added, that transfer is measured when you add it, and the network’s floor applies until it is measured. For a native coin sweep the fee is a markup on the sweep’s gas, native_markup_bps, but never more than the sweep saves against a plain 21,000-gas transfer. Everything is counted in gas, at the batch’s gas price. A sweep is priced with the rate and conventional cost in force when its batch is prepared; tokens lists each of your tokens with both.

StatusDescription
200The tariff on each chain. Returns the fields below.
401unauthorized: no API key, an unknown one or a revoked one.
403partner_disabled: your account is disabled.
FieldTypeDescription
chains requiredarray of ChainTariff
Terminal window
curl "https://api-testnet.portuna.io/v1/tariff" \
-H "Authorization: Bearer $PORTUNA_API_KEY"
200 OK
{
"chains": [
{
"chain_id": 97,
"name": "bsc-testnet",
"rate_bps": 0,
"rate": "0%",
"native_markup_bps": 0,
"native_markup": "0%",
"conventional_gas": {
"BNB": {
"new": 21000,
"existing": 21000
},
"USDT": {
"new": 50667,
"existing": 50667
}
},
"extra_gas": {
"delegation": 15176,
"account": 2824
},
"custom_tokens": {
"kind": "custom_default",
"rule": "conventional_share",
"rate_bps": 8000,
"since": null,
"valid_until": null,
"next_rate_bps": null
},
"floor": {
"transfer_gas": 27900,
"conventional_gas": {
"new": 48900,
"existing": 48900
}
},
"tokens": [
{
"token": "native",
"symbol": "BNB",
"source": "preset",
"status": "active",
"tariff": {
"kind": "base",
"rule": "gas_markup",
"rate_bps": 0,
"since": null,
"valid_until": null,
"next_rate_bps": null
},
"baseline": {
"transfer_gas": null,
"conventional_gas": {
"new": 21000,
"existing": 21000
},
"version": null,
"method": "fork",
"measured_at": null,
"block": null,
"status": "measured",
"next": null
}
},
{
"token": "USDT",
"address": "0x3809a97a7a25C8bA577027c0AE2D81a09cdA1a2f",
"symbol": "USDT",
"source": "preset",
"status": "active",
"tariff": {
"kind": "base",
"rule": "conventional_share",
"rate_bps": 0,
"since": null,
"valid_until": null,
"next_rate_bps": null
},
"baseline": {
"transfer_gas": 29667,
"conventional_gas": {
"new": 50667,
"existing": 50667
},
"version": null,
"method": "fork",
"measured_at": null,
"block": null,
"status": "measured",
"next": null
}
}
]
},
{
"chain_id": 11155111,
"name": "sepolia",
"rate_bps": 7000,
"rate": "70%",
"native_markup_bps": 1000,
"native_markup": "10%",
"conventional_gas": {
"ETH": {
"new": 21000,
"existing": 21000
},
"USDT": {
"new": 237233,
"existing": 53633
}
},
"extra_gas": {
"delegation": 49106,
"account": 176503
},
"custom_tokens": {
"kind": "custom_default",
"rule": "conventional_share",
"rate_bps": 8000,
"since": null,
"valid_until": null,
"next_rate_bps": null
},
"floor": {
"transfer_gas": 31000,
"conventional_gas": {
"new": 235600,
"existing": 52000
}
},
"tokens": [
{
"token": "native",
"symbol": "ETH",
"source": "preset",
"status": "active",
"tariff": {
"kind": "base",
"rule": "gas_markup",
"rate_bps": 1000,
"since": null,
"valid_until": null,
"next_rate_bps": null
},
"baseline": {
"transfer_gas": null,
"conventional_gas": {
"new": 21000,
"existing": 21000
},
"version": null,
"method": "fork",
"measured_at": null,
"block": null,
"status": "measured",
"next": null
}
},
{
"token": "USDT",
"address": "0x3809a97a7a25C8bA577027c0AE2D81a09cdA1a2f",
"symbol": "USDT",
"source": "preset",
"status": "active",
"tariff": {
"kind": "base",
"rule": "conventional_share",
"rate_bps": 7000,
"since": null,
"valid_until": null,
"next_rate_bps": null
},
"baseline": {
"transfer_gas": 32633,
"conventional_gas": {
"new": 237233,
"existing": 53633
},
"version": null,
"method": "fork",
"measured_at": null,
"block": null,
"status": "measured",
"next": null
}
},
{
"token": "0xd8bb299F465D010157B980D87C7A5ae3Ea9cA8d9",
"address": "0xd8bb299F465D010157B980D87C7A5ae3Ea9cA8d9",
"symbol": "EURX",
"source": "custom",
"status": "active",
"tariff": {
"kind": "custom_default",
"rule": "conventional_share",
"rate_bps": 8000,
"since": null,
"valid_until": null,
"next_rate_bps": null
},
"baseline": {
"transfer_gas": 34512,
"conventional_gas": {
"new": 239112,
"existing": 55512
},
"version": 1,
"method": "simulate",
"measured_at": "2026-10-11T09:12:28Z",
"block": 9412345,
"status": "measured",
"next": null
}
}
]
}
]
}

GET/v1/settings

StatusDescription
200Your settings. Returns Settings.
401unauthorized: no API key, an unknown one or a revoked one.
403partner_disabled: your account is disabled.
Terminal window
curl "https://api-testnet.portuna.io/v1/settings" \
-H "Authorization: Bearer $PORTUNA_API_KEY"
200 OK
{
"keep_one_unit": false
}

PATCH/v1/settings

Changes only the fields in the request and keeps the others.

FieldTypeDescription
keep_one_unitbooleanToken sweeps leave 1 smallest unit on the deposit address, which makes your user’s next deposit cheaper. A sweep request can override it. Off by default.
StatusDescription
200The settings after the change. Returns Settings.
400invalid_json: the body is not JSON, is over 64 KiB or has unknown fields.
401unauthorized: no API key, an unknown one or a revoked one.
403partner_disabled: your account is disabled.
Terminal window
curl -X PATCH "https://api-testnet.portuna.io/v1/settings" \
-H "Authorization: Bearer $PORTUNA_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"keep_one_unit": true
}'
200 OK
{
"keep_one_unit": true
}

GET/v1/ledger

Everything that moved your gas wallet’s balance, newest first: the gas of transactions, fees, charges and credits under your agreement, withdrawals of fees and top-ups. Fees (fee, fee_charge) stay on the wallet in reserve until a withdrawal takes them, so a withdrawal is not a new expense: it is that reserve leaving the wallet, together with the withdrawal’s gas.

NameInTypeDescription
limitqueryintegerHow many rows a page holds. From 1 to 200. Default: 50.
cursorquerystringThe next_cursor of the previous page; none for the first page.
chain_idqueryChainIDOnly this chain.
kindqueryLedgerKindOnly entries of this kind. One of: gas, fee, fee_charge, fee_credit, withdrawal, topup, payout.
StatusDescription
200A page of entries. Returns the fields below.
400invalid_query: a query parameter is not valid; message says which.
401unauthorized: no API key, an unknown one or a revoked one.
403partner_disabled: your account is disabled.
FieldTypeDescription
items requiredarray of LedgerEntry
next_cursor requiredNextCursorThe cursor of the next page; null on the last page.
Terminal window
curl "https://api-testnet.portuna.io/v1/ledger?chain_id=11155111&limit=3" \
-H "Authorization: Bearer $PORTUNA_API_KEY"
200 OK
{
"items": [
{
"id": 1042,
"chain_id": 11155111,
"kind": "fee",
"amount": "-23358000000000",
"tx_hash": "0xe2a3d8ffdcd7c4ed8a2389a59ce91622863c495d052a7571206bb494919dc35b",
"sweep_id": "8a6e2f31-0c4b-4d7a-b1e5-92f3c6d8a047",
"note": null,
"created_at": "2026-10-11T07:03:02Z"
},
{
"id": 1041,
"chain_id": 11155111,
"kind": "gas",
"amount": "-3791988000000000",
"tx_hash": "0xe2a3d8ffdcd7c4ed8a2389a59ce91622863c495d052a7571206bb494919dc35b",
"sweep_id": null,
"note": null,
"created_at": "2026-10-11T07:03:02Z"
},
{
"id": 1017,
"chain_id": 11155111,
"kind": "topup",
"amount": "50000000000000000",
"tx_hash": null,
"sweep_id": null,
"note": "blocks 9402114–9402415",
"created_at": "2026-10-10T09:05:11Z"
}
],
"next_cursor": "eyJ0IjoiMjAyNi0xMC0xMFQwOTowNToxMVoiLCJpZCI6MTAxN30"
}

GET/v1/payouts

Payouts of your gas wallet’s available balance to your own hot wallets, newest first. Your organization’s owner asks for a payout in the Portuna console, with a fresh code of their authenticator app; the API only lists them. Each payout ends paid or failed, and each step comes as a balance.payout event.

NameInTypeDescription
limitqueryintegerHow many rows a page holds. From 1 to 200. Default: 50.
cursorquerystringThe next_cursor of the previous page; none for the first page.
chain_idqueryChainIDOnly this chain.
statusquerystringOnly payouts in this status. One of: queued, sent, paid, failed.
StatusDescription
200A page of payouts. Returns the fields below.
400invalid_query: a query parameter is not valid; message says which.
401unauthorized: no API key, an unknown one or a revoked one.
403partner_disabled: your account is disabled.
FieldTypeDescription
items requiredarray of Payout
next_cursor requiredNextCursorThe cursor of the next page; null on the last page.
Terminal window
curl "https://api-testnet.portuna.io/v1/payouts" \
-H "Authorization: Bearer $PORTUNA_API_KEY"
200 OK
{
"items": [
{
"id": "0b6f8c2e-5a41-4d3c-9e7a-2f1d8b6c4a10",
"chain_id": 11155111,
"to": "0x2Cd50979a8A33e8CA37DA85F8517fb148a67b769",
"amount": "1000000",
"all": false,
"status": "queued",
"reason": "insufficient_available",
"tx_hash": "string",
"gas_cost": "string",
"requested_by": "string",
"created_at": "2026-10-10T12:00:00Z",
"sent_at": "2026-10-10T12:00:00Z",
"settled_at": "2026-10-10T12:00:00Z"
}
],
"next_cursor": "string"
}

GET/v1/usage

Each of the last days days, today included, by UTC day, oldest first, on every chain of the environment (or only on chain_id), with zeros for days without activity. Sweeps and revocations count on the day they were created, by how they ended; gas counts on the day of its transaction, fees on the day they accrued.

NameInTypeDescription
daysqueryintegerHow many days to return, today included. From 1 to 90. Default: 30.
chain_idqueryChainIDOnly this chain.
StatusDescription
200A row for each day and chain. Returns the fields below.
400invalid_query: a query parameter is not valid; message says which.
401unauthorized: no API key, an unknown one or a revoked one.
403partner_disabled: your account is disabled.
FieldTypeDescription
days requiredarray of UsageDay
Terminal window
curl "https://api-testnet.portuna.io/v1/usage?days=2&chain_id=11155111" \
-H "Authorization: Bearer $PORTUNA_API_KEY"
200 OK
{
"days": [
{
"date": "2026-10-10",
"chain_id": 11155111,
"sweeps_done": 3,
"sweeps_failed": 0,
"sweeps_rejected": 1,
"revocations_done": 0,
"gas_spent": "1427640000000000",
"fees": "0"
},
{
"date": "2026-10-11",
"chain_id": 11155111,
"sweeps_done": 50,
"sweeps_failed": 0,
"sweeps_rejected": 0,
"revocations_done": 1,
"gas_spent": "3826548000000000",
"fees": "934320000000000"
}
]
}

GET/v1/reports/monthly

Conventional cost, actual cost and savings for one UTC month, per chain and token: what your sweeps would have cost as conventional sweeps (top up the deposit address, then transfer from it), what they cost you with Portuna (their share of the batch gas and the fees) and the difference. Each sweep counts with what it was priced with when its batch was prepared – its kind, the conventional cost and its version, the rate – at its batch’s gas price, so a rate or conventional cost changed later does not change a past month. A sweep counts in the month its batch was settled, when its fee reached the ledger. Swept sweeps make up the report; those that failed in a mined batch are counted apart, with the gas they took and no fee. Rows come by chain, then by token; a month without sweeps has none.

NameInTypeDescription
monthquerystringThe UTC month, YYYY-MM; the current month by default. A month after the current one is refused. Format: ^[0-9]{4}-[0-9]{2}$.
StatusDescription
200The month’s report. Returns MonthlyReport.
400invalid_query: a query parameter is not valid; message says which.
401unauthorized: no API key, an unknown one or a revoked one.
403partner_disabled: your account is disabled.
Terminal window
curl "https://api-testnet.portuna.io/v1/reports/monthly?month=2026-10" \
-H "Authorization: Bearer $PORTUNA_API_KEY"
200 OK
{
"month": "2026-10",
"from": "2026-10-01T00:00:00Z",
"to": "2026-11-01T00:00:00Z",
"items": [
{
"chain_id": 11155111,
"token": "USDT",
"token_address": "0x5B74f75040584b133Ff1EB67eEe646B0da26e39C",
"token_symbol": "USDT",
"sweeps": {
"total": 120,
"repeat": 100,
"first": 18,
"first_new": 2
},
"baselines": [
{
"version": null,
"sweeps": 120,
"conventional_gas": 7475960,
"conventional_cost": "7475960000000000"
}
],
"conventional_gas": 7475960,
"conventional_cost": "7475960000000000",
"gas": 3121800,
"gas_cost": "3121800000000000",
"fee_gas": 2111372,
"fee": "2111372000000000",
"savings_gas": 2242788,
"savings": "2242788000000000",
"paid_bps": 7000,
"failed": 1,
"failed_gas": 26015,
"failed_gas_cost": "26015000000000"
},
{
"chain_id": 11155111,
"token": "0xd8bb299F465D010157B980D87C7A5ae3Ea9cA8d9",
"token_address": "0xd8bb299F465D010157B980D87C7A5ae3Ea9cA8d9",
"token_symbol": "PEPE",
"sweeps": {
"total": 30,
"repeat": 28,
"first": 2,
"first_new": 0
},
"baselines": [
{
"version": 1,
"sweeps": 12,
"conventional_gas": 611016,
"conventional_cost": "611016000000000"
},
{
"version": 2,
"sweeps": 18,
"conventional_gas": 951660,
"conventional_cost": "951660000000000"
}
],
"conventional_gas": 1562676,
"conventional_cost": "1562676000000000",
"gas": 655830,
"gas_cost": "655830000000000",
"fee_gas": 594311,
"fee": "594311000000000",
"savings_gas": 312535,
"savings": "312535000000000",
"paid_bps": 8000,
"failed": 0,
"failed_gas": 0,
"failed_gas_cost": "0"
}
]
}