Quote a routed payout

POST/payouts/quotes

Price a payout to another network or asset, as a create with the same members would price it, and hold its route until expires_at. Nothing moves and no payout exists yet. POST /payouts naming the answer's id as quote_id before expires_at pays through this route, for this quote's destination_amount.

  • Only a routed payout has a quote.

    destination_network_symbol or destination_asset must name another network or asset than the vault pays from; otherwise it answers 422 parameter_invalid naming destination_network_symbol.

  • The refusals are the create's.

    vault_id, to_address, network_symbol and asset are required, and a body without one, or with one that is only whitespace, answers 422 parameter_missing naming it; a member of the wrong type or a vault_id that is not a UUID answers 422 parameter_invalid naming the member, and a member the body does not declare answers 400 parameter_unknown naming it. Stating neither amount nor usd_amount answers 422 parameter_missing naming amount; stating both or a usd_amount that is not a positive decimal answers 422 parameter_invalid naming it. A to_address that does not check out for the chain the recipient is paid on, a network or asset the environment does not support and a max_slippage_bps out of its bounds each answer 422 parameter_invalid naming the member. A vault the environment does not hold answers 404 resource_missing naming vault_id, resolved before any check the schema does not state.

Show 6 more details
  • What the route needs.

    A pair no provider quotes, or a network not served here, answers 422 route_unavailable, routed payouts not enabled for the workspace 422 routed_payouts_disabled, a vault network or asset routes cannot leave 422 route_source_unsupported, a vault gas no gas station funds 422 gas_station_missing, and a miner fee that cannot be priced 422 miner_fee_unpriced. A vault without the balance answers 422 balance_insufficient and one without the gas 422 gas_insufficient; a vault with no wallet on the chain answers 422 vault_wallet_missing, and a usd_amount Stridge cannot price 422 payout_price_unavailable.

  • It has its own budget.

    Each quote asks a provider and holds a route, so a workspace may ask for 30 a minute, /v1 quotes included; past that it answers 429 rate_limited.

  • Retrying a quote.

    Send an Idempotency-Key and a retry with the same key and the same body within 24 hours answers the first 201 again and holds no second route. The same key with a different body answers 400 idempotency_key_reused, and a retry while the first is still running answers 409 idempotency_key_in_use.

  • Who may.

    In live it is an owner's alone: a developer or a viewer answers 403 permission_denied, checked before the step-up. In a sandbox an owner and a developer may, and a viewer answers 403 permission_denied. A secret key of the environment may too when it holds payout.quote or payout.create, so the key that creates a payout quotes it; one holding neither answers 403 permission_denied.

  • Step-up.

    In live, a person needs a fresh step-up (totp or backup_code, never email) no older than 15 minutes, which the act renews; without one it answers 403 step_up_required, and an owner with no authenticator is answered enrolment_required: true. A sandbox never asks, and neither does a key.

  • A resetting sandbox.

    While a sandbox's reset runs it answers 409 environment_resetting.

Header parameters

  • X-Stridge-Environmentstring <uuid>optional

    Which environment the request acts inside, on an operation a session and an API key both call. Learn more

    Show full description

    It is required under a person's session, exactly as EnvironmentHeader describes: a session request that omits it answers 400 with environment required, and one naming an environment the caller holds no membership of answers 404.

    An API key names its own environment, so a request made with one omits this header. A key request that sends it answers 400 with environment header not accepted, whatever it names, rather than having the header ignored: a header that is silently ignored hides the integration bug that sent it.

  • Idempotency-Keystringoptional

    A caller-chosen key making this request safe to retry. Sent, the server remembers what the first request with it produced; omitted, every request is a new one. Learn more

    Show full description

    The same key with the same parameters returns the first result, status and body both, and does nothing a second time. So a retry after a dropped connection is safe whether or not the first attempt landed. The parameters are compared as parsed, not as bytes: the query with its names sorted and the JSON body decoded, so member order, spacing and escaping never make two requests differ, while any changed value does.

    What is remembered is the answer of an attempt that began execution, success or failure, a 500 included. A refusal made before execution is not remembered, so a retry with the same key runs afresh once its cause is fixed: a validation error (400, 422), a 409 conflict, a 429, a 403 step_up_required, and any answer carrying Retry-After. An answer whose body is larger than 64 KiB is not remembered either, and an operation may say that its 500 is not; a retry of either runs the request again. What the first attempt did stands, so a create that took a unique value answers that value's conflict on the retry: a payout whose first attempt took its reference_id answers 409 payout_reference_taken.

    The same key with different parameters answers 400 with idempotency key replayed with a different body: a key names one request, and reusing it for another is a client bug rather than a retry. A replay while the first request is still in flight answers 409 at once with a request with this idempotency key is still in flight, and the remedy is to retry once the first has answered.

    Keys are scoped to the environment the request acts inside, and to its reset: one environment's key never answers another environment's request, and a key used before a sandbox reset runs afresh after it.

    An operation that acts on a workspace or on the account rather than inside an environment, such as creating a workspace or requesting go-live in the dashboard, scopes its keys to the caller and to its path, so the same key sent for another workspace is a separate request and never a replay.

Request body

  • vault_idstring <uuid>required

    The vault to pay from. A vault outside the environment is refused.

  • to_addressstringrequired

    The address to pay, valid for the chain the recipient is paid on.

  • network_symbolstringrequired

    The chain the vault pays from.

  • assetstringrequired

    The asset the vault pays in, matched in any case.

  • What the recipient receives, as a positive TokenAmount stated in destination_asset (the body's asset when that is left out) at its decimals on destination_network_symbol (the body's network_symbol when that is left out).

    • amountstringrequired

      The amount in the asset's base units: digits only, no sign, no exponent and no leading zero ("0" for zero). At most a uint256, the widest on-chain amount.

    • amount_decimalstringrequired

      The exact human amount, amount / 10^decimals: no sign, no exponent, no leading zero before the point other than a lone 0, and no trailing zero after it ("12.5", "0.000001", "3").

    • decimalsinteger <int32>required

      The asset's decimals on its network, which amount_decimal is scaled by.

    • assetstringrequired

      The symbol of the asset the amount is in (USDC), so a fee or a total never mixes units.

  • usd_amountstring

    What value to pay in USD, as a positive decimal string, letting Stridge convert.

  • destination_network_symbolstring

    The chain the recipient is paid on, when it is not network_symbol.

  • destination_assetstring

    The asset the recipient is paid in, when it is not asset.

  • max_slippage_bpsinteger

    The slippage the route may take, in basis points; omitted, Stridge's default.

Responses

The payout was priced and its route is held until expires_at.

  • idstringrequired

    What a create names as quote_id.

  • objectstringrequired

    The object's type, always payout_quote.

  • environment_idstring <uuid>required

    The environment whose vault would pay.

  • livemodebooleanrequired

    true when environment_id names a live environment and false in a sandbox.

  • vault_idstring <uuid>required

    The vault that would pay.

  • to_addressstringrequired

    The address the recipient would be paid at, as the chain spells it.

Show 10 more fields
  • network_symbolstringrequired

    The chain the vault pays from.

  • assetstringrequired

    The asset the vault pays in.

  • destination_network_symbolstringrequired

    The chain the recipient is paid on.

  • destination_assetstringrequired

    The asset the recipient is paid in.

  • What the vault would spend, the provider's fee included.

    • amountstringrequired

      The amount in the asset's base units: digits only, no sign, no exponent and no leading zero ("0" for zero). At most a uint256, the widest on-chain amount.

    • amount_decimalstringrequired

      The exact human amount, amount / 10^decimals: no sign, no exponent, no leading zero before the point other than a lone 0, and no trailing zero after it ("12.5", "0.000001", "3").

    • decimalsinteger <int32>required

      The asset's decimals on its network, which amount_decimal is scaled by.

    • assetstringrequired

      The symbol of the asset the amount is in (USDC), so a fee or a total never mixes units.

  • What the recipient would receive.

    • amountstringrequired

      The amount in the asset's base units: digits only, no sign, no exponent and no leading zero ("0" for zero). At most a uint256, the widest on-chain amount.

    • amount_decimalstringrequired

      The exact human amount, amount / 10^decimals: no sign, no exponent, no leading zero before the point other than a lone 0, and no trailing zero after it ("12.5", "0.000001", "3").

    • decimalsinteger <int32>required

      The asset's decimals on its network, which amount_decimal is scaled by.

    • assetstringrequired

      The symbol of the asset the amount is in (USDC), so a fee or a total never mixes units.

  • providerstringrequired

    The provider carrying the route.

  • provider_feestringrequired

    The provider's fee, in the source asset.

  • gas_fundingstringrequiredenum vault · central · tenant

    Who would pay the network fee.

  • expires_atstring <date-time>required

    When the held route lapses. A create naming the quote from then on answers 422 quote_expired.

Errors

The error.code values this operation can return. Each one links to its entry in the error catalogue, which explains the cause and the fix.

Request
curl "https://api.stridge.com/v2/payouts/quotes" \
  -X POST \
  -H "Authorization: Bearer $STRIDGE_SECRET_KEY" \
  -H "Idempotency-Key: $(uuidgen)" \
  -H "Content-Type: application/json" \
  -d '{
  "vault_id": "7c1e0a94-31d6-4a52-9f83-2b4c5d6e7f80",
  "to_address": "0xAb5801a7D398351b8bE11C439e05C5B3259aeC9B",
  "network_symbol": "tron",
  "asset": "USDT",
  "amount": {
    "amount": "12500000",
    "amount_decimal": "12.5",
    "decimals": 6,
    "asset": "USDC"
  },
  "usd_amount": "100.50",
  "destination_network_symbol": "base",
  "destination_asset": "USDC",
  "max_slippage_bps": 50
}'

Set your secret key as STRIDGE_SECRET_KEY (sent as Authorization: Bearer).

Response201
"id": "0199b1a0-0000-7000-8000-000000000000",
"object": "payout_quote",
"environment_id": "string",
"livemode": false,
"vault_id": "string",
"to_address": "0xAb5801a7D398351b8bE11C439e05C5B3259aeC9B",
"network_symbol": "tron",
"asset": "USDT",
"destination_network_symbol": "base",
"destination_asset": "USDC",
"amount": "12500000",
"amount_decimal": "12.5",
"decimals": 6,
"asset": "USDC"
},
"amount": "12500000",
"amount_decimal": "12.5",
"decimals": 6,
"asset": "USDC"
},
"provider": "relay",
"provider_fee": "0.21",
"gas_funding": "vault",
"expires_at": "2026-06-01T12:05:00Z"
}