Swaps

Retrieve Swap

Retrieves a single swap and its status.

get/swaps/{id}

Path parameters

idstring required

Swap ID returned from POST /swaps.

Response

swap status retrieved

account_idstring required

Account that owns the swap: a business ID prefixed biz_, or the user ID for a personal account.

errorstring nullable

Latest error returned for a failed swap.

idstring required

Swap ID.

object'swap' required
status'queued' | 'working' | 'complete' | 'failed' required

Current swap status. complete and failed are terminal.

tx_hashesstring[] required

On-chain transaction hashes produced by the swap.

user_idstring nullable required

User whose personal account owns the swap, prefixed user_. Null for a business account.

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

Changed in 64 of the 74 revisions of this API.4131

    • ○

      the security scope crypto_wallet:swap was added to the endpoint's security scheme bearerAuth

      api-security-scope-added

    • ○

      the security scope crypto_wallet:manage was removed from the endpoint's security scheme bearerAuth

      api-security-scope-removed

    • ○

      the security scope crypto_wallet:swap was added to the endpoint's security scheme bearerAuth

      api-security-scope-added

    • ○

      the security scope crypto_wallet:manage was removed from the endpoint's security scheme bearerAuth

      api-security-scope-removed

    • ○

      the security scope crypto_wallet:swap was added to the endpoint's security scheme bearerAuth

      api-security-scope-added

    • ○

      the security scope crypto_wallet:manage was removed from the endpoint's security scheme bearerAuth

      api-security-scope-removed

    • ○

      the security scope crypto_wallet:swap was added to the endpoint's security scheme bearerAuth

      api-security-scope-added

    • ○

      the security scope crypto_wallet:manage was removed from the endpoint's security scheme bearerAuth

      api-security-scope-removed

    • ○

      added the new optional header request parameter Api-Version-Date to all path's operations

      new-optional-request-default-parameter-to-existing-path

    • ○

      added the required property to the response with the status

      response-required-property-added

    • ○

      the security scope crypto_wallet:swap was added to the endpoint's security scheme bearerAuth

      api-security-scope-added

    • ○

      the security scope crypto_wallet:manage was removed from the endpoint's security scheme bearerAuth

      api-security-scope-removed

    This revision also has 1 change that name no endpoint, such as unreferenced schemas being removed. See the revision's changelog

    • ○

      the security scope crypto_wallet:swap was added to the endpoint's security scheme bearerAuth

      api-security-scope-added

    • ○

      the security scope crypto_wallet:manage was removed from the endpoint's security scheme bearerAuth

      api-security-scope-removed

    • ○

      the security scope crypto_wallet:swap was added to the endpoint's security scheme bearerAuth

      api-security-scope-added

    • ○

      the security scope crypto_wallet:manage was removed from the endpoint's security scheme bearerAuth

      api-security-scope-removed

    This revision also has 2 changes that name no endpoint, such as unreferenced schemas being removed. See the revision's changelog

    • ○

      the security scope crypto_wallet:swap was added to the endpoint's security scheme bearerAuth

      api-security-scope-added

    • ○

      the security scope crypto_wallet:manage was removed from the endpoint's security scheme bearerAuth

      api-security-scope-removed

    • ○

      the security scope crypto_wallet:swap was added to the endpoint's security scheme bearerAuth

      api-security-scope-added

    • ○

      the security scope crypto_wallet:manage was removed from the endpoint's security scheme bearerAuth

      api-security-scope-removed

    • ○

      the security scope crypto_wallet:swap was added to the endpoint's security scheme bearerAuth

      api-security-scope-added

    • ○

      the security scope crypto_wallet:manage was removed from the endpoint's security scheme bearerAuth

      api-security-scope-removed

Of the 74 revisions, 1 has no diff computed.