Skip to content
API Reference

Search is only available in production builds. Try building and previewing the site to test it out locally.

Fee sinks

Inspect the rotating fee-receiver pool and trigger sweeps, rotations and drains.

Fee sinks are rotating addresses that receive Proxima's fees on each chain before they are drained to the treasury. A sink moves from funding to active, then draining and retired.

These endpoints serve the admin Sinks page. Sweeps and rotations normally run on a schedule; the trigger endpoints start a run now.

A fee-receiver address with its live balances. No secrets are returned.

Attributes

  • id integer
    Sink id.
  • chain_id string
    Chain id.
  • asset enum
    Asset the sink collects.
    Possible values nativeusdcusd1
  • address string
    Sink address.
  • status enum
    Lifecycle status.
    Possible values fundingactivedrainingretired
  • total_received_usd integer
    Total received, in micro-USD.
  • husher_order_id string | null
    Id of the drain order.
  • drain_token string | null
    Token the drain delivers.
  • drain_network string | null
    Network the drain delivers on.
  • opened_at integer | null
    Creation time, Unix seconds.
  • activated_at integer | null
    Activation time, Unix seconds.
  • retired_at integer | null
    Retirement time, Unix seconds.
  • native_balance string
    Live native balance, in lamports or wei, as an integer string.
  • token_balance string
    Live asset balance in base units, as an integer string.

List sinks

Admin JWT internal
GET /admin/sinks

Returns one chain's sinks with live on-chain balances, newest first.

Token
Upgraded session token of an account with admin rights.
Read-only tokens
Allowed.
Retry
Safe to retry

Query parameters

  • chain enum Optional Default sol
    Chain.
    Possible values solbscethbaserobinhood
  • status enum Optional
    Filters on status. Use retired to see closed sinks.
    Possible values fundingactivedrainingretired
  • asset enum Optional
    Filters on asset.
    Possible values nativeusdcusd1

Returns 200 OK · application/json

  • sinks array<object>
    Sinks. See Sink.

Errors

Only the common errors: 401 for a missing or expired session, 403 forbidden without the admin role and 429 when rate limited.

Web client proxima.adminSinks.listSinks(query) src/lib/proxima/endpoints/adminSinks.ts

Run a fee sweep

Admin JWT internal
POST /admin/sinks/run-sweep

Starts a fee sweep on a chain now.

Token
Upgraded session token of an account with admin rights.
Read-only tokens
Refused with 403 read_only_token.
Retry
Safe to retry A sweep already running makes the new one skip, and a later run only collects what is still pending.

A sweep collects fees into the sinks and pays referrers. It runs in the background: the response only confirms it started, and failures are not reported back.

Query parameters

  • chain enum Optional Default sol
    Chain.
    Possible values solbscethbaserobinhood

Returns 200 OK · application/json

  • ok boolean
    true when accepted.
  • triggered string
    Job started: fee_sweep or sink_rotation.
  • chain string
    The chain query value, sol when omitted.

Errors

Only the common errors: 401 for a missing or expired session, 403 forbidden without the admin role, 403 read_only_token and 429 when rate limited.

Web client proxima.adminSinks.runSweep(chain) src/lib/proxima/endpoints/adminSinks.ts

Run a sink rotation

Admin JWT internal
POST /admin/sinks/run-rotation

Starts a sink rotation on a chain now.

Token
Upgraded session token of an account with admin rights.
Read-only tokens
Refused with 403 read_only_token.
Retry
Safe to retry A rotation already running makes the new one skip, and a later run only acts on sinks that still need it.

A rotation maintains the sink pool and drains sinks. It runs in the background: the response only confirms it started.

Query parameters

  • chain enum Optional Default sol
    Chain.
    Possible values solbscethbaserobinhood

Returns 200 OK · application/json

  • ok boolean
    true when accepted.
  • triggered string
    Job started: fee_sweep or sink_rotation.
  • chain string
    The chain query value, sol when omitted.

Errors

Only the common errors: 401 for a missing or expired session, 403 forbidden without the admin role, 403 read_only_token and 429 when rate limited.

Web client proxima.adminSinks.runRotation(chain) src/lib/proxima/endpoints/adminSinks.ts

Close a sink

Admin JWT internal
POST /admin/sinks/{sink_id}/close

Drains an active sink to the treasury and retires it.

Token
Upgraded session token of an account with admin rights.
Read-only tokens
Refused with 403 read_only_token.
Retry
Check before retrying A lost call may have started the drain. Read the sink with List sinks: draining or retired means it did.

The sink moves to draining at once and to retired once the drain settles. The sink's own chain is used.

Path parameters

  • sink_id integer Required
    Sink id.

Returns 200 OK · application/json

  • ok boolean
    true when accepted.
  • message string
    Outcome, such as drain initiated for usdc sink 42.

Errors

StatusCodeWhen and what to do
422 unprocessable No sink has this id. Use a sink id returned by List sinks.
422 unprocessable A sink rotation is running and holds the sinks. Retry in a few seconds.
422 unprocessable The sink is not active: it is still funding, already draining, or retired. Check the sink's status with List sinks; only an active sink can be closed.
422 unprocessable The drain could not start, for example husher not configured. The message is the reason, and the sink stays active. Fix the cause in the message, then retry.

Also the common errors: 401 for a missing or expired session, 403 forbidden without the admin role, 403 read_only_token and 429 when rate limited.

Web client proxima.adminSinks.closeSink(id) src/lib/proxima/endpoints/adminSinks.ts