Swaps
List Swaps
Changed onLists the completed or pending swaps for an account or user — currently only the most recent one.
get/swaps
Request
- Base URL: https://api.whop.com/api/v1
- URL: https://api.whop.com/api/v1/swaps
- Auth: one of:
- HTTP bearer
- HTTP bearer
Query parameters
account_idstring
Business account whose swaps to list, prefixed biz_. Provide this or user_id.
user_idstring
The caller's own user ID, prefixed user_, to list swaps in their personal account. Provide this or account_id.
Response
swaps listed
Example response
{
"data": [
{
"account_id": "biz_xxxxxxxxxxxxxx",
"error": "Swap reverted: quoted price moved beyond the slippage tolerance",
"id": "vault-swap-cwal_xxxxxxxxxxxxxx",
"object": "swap",
"status": "working",
"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