Agara
Bridge

Withdraw to another chain

POST
/trade/v1/portfolio/bridge/withdraw

Authorization

Authorization
Required
Bearer <token>

Privy identity token from a live browser session. Issued by the web app's Privy SDK; not obtainable via API. Used by operations that require a fresh browser session.

In: header

Request Body

application/jsonRequired

exchangestring

Exchange to withdraw from. Defaults to AGARA.

Value in: "AGARA"

from_amount_base_unit
Required
string

Source amount in source-token base units.

recipient_address
Required
string

Destination recipient address.

to_chain_id
Required
string

Destination chain id.

to_token_address
Required
string

Destination token address.

curl -X POST "https://app.agara.xyz/trade/v1/portfolio/bridge/withdraw" \
  -H "Authorization: Bearer <token>" \
  -H "Content-Type: application/json" \
  -d '{
    "exchange": "AGARA",
    "from_amount_base_unit": "1000000",
    "recipient_address": "0x1111111111111111111111111111111111111111",
    "to_chain_id": "42161",
    "to_token_address": "0xaf88d065e77c8cC2239327C5EDb3A432268e5831"
  }'

AGARA: withdrawal batch accepted; poll GET /trade/v1/batches/{batch_hash} for settlement.

{
  "as_of": "2019-08-24T14:15:22Z",
  "batch_hash": "string",
  "status": "string"
}