Swaps
Retrieve Swap
Changed onRetrieves a swap and its status. Poll it after creating a crypto swap, which finishes in the background.
get/swaps/{id}
Request
- Base URL: https://api.whop.com/api/v1
- URL: https://api.whop.com/api/v1/swaps/{id}
- Auth: one of:
- HTTP bearer
- HTTP bearer
Path parameters
idstring required
Swap ID returned from POST /swaps.
Response
swap status retrieved
Example response
{
"account_id": "biz_xxxxxxxxxxxxxx",
"error": "Swap reverted: quoted price moved beyond the slippage tolerance",
"id": "vault-swap-cwal_xxxxxxxxxxxxxx",
"object": "swap",
"status": "failed",
"tx_hashes": [
"0xabc"
]
}Changes
- info
the security scope
crypto_wallet:swapwas added to the endpoint's security schemebearerAuth - info
the security scope
crypto_wallet:managewas removed from the endpoint's security schemebearerAuth
- info
- info
the security scope
crypto_wallet:swapwas added to the endpoint's security schemebearerAuth - info
the security scope
crypto_wallet:managewas removed from the endpoint's security schemebearerAuth
- info