openapi: 3.0.0
info:
  version: 2.0.0
  title: Anchorage Digital API Reference
  contact:
    email: api@anchorage.com
  description: |-
    # Introduction
    *CONFIDENTIAL: Please do not distribute this documentation externally without prior Anchorage Digital approval.*


    The Anchorage Digital REST API v2.0 provides a set of operations and resources that allow Anchorage Digital clients and partners to:
      - Programmatically transfer funds from an Anchorage Digital vault or wallet without human intervention
      - Create and list deposit addresses in a vault
      - Read and monitor vault balances
      - Query transaction history including deposits
      - Request quotes from and execute trades with the Anchorage Digital trading desk


    Want help or to share your opinion on how this API works for you? Please contact api@anchorage.com.


    # Authentication and Security

    The Anchorage Digital API performs authentication and authorization via a combination of:


    * An API key, which is a bearer token

    * A permission group signed by the user's organization, which is linked to the API key

    * An Ed25519 Signature, which comes from a user-generated key and is required for certain requests


    ## Permission Groups


    A permission group acts as a set of rules for how an organization and its resources can be accessed. Permission groups are created independently of API keys, and new permission groups must be created prior to making an API key.


    Each permission group has a name, a description and a set of permissions which can be applied to your organization's vaults. Updating, creating and deleting permissions groups require a quorum of approvals. After creation, a permission group can be freely assigned to an unlimited number of API keys.


    Each API key inherits its permissions from the associated permission group. When the permission group is updated, all API keys associated with it will inherit the updated permission set. If a permission group is deleted, all associated API keys will no longer work.


    Each organization is created with a default permission group that allows read-only access. This permission group may be modified or deleted at any time, and no API keys are created by default with this permission group.


    ### Permissions


    Possible vault permissions include the following:


    <table>
      <tr>
        <td><b>Read vault activity (READ)</b></td>
        <td>See an overview of your vault(s) and wallets. Read vault details, balances, asset types, transaction history and deposit addresses.</td>
      </tr>
      <tr>
        <td><b>Create address (CREATE_DEPOSIT_ADDRESS)</b></td>
        <td>Receive deposits in the vault from external sources. Create and read deposit addresses.</td>
      </tr>
      <tr>
        <td><b>Transfer funds (TRANSFER)</b></td>
        <td>This permission is configurable to enable an API key endowed with this permission to either 1) Transfer funds to any Anchorage Digital institutional account, including those outside of your organization or 2) Transfer funds to any blockchain address not custodied by Anchorage Digital that has gone through quorum approval.</td>
      </tr>
      <tr>
        <td><b>Propose and accept settlements (PROPOSE_ACCEPT_SETTLEMENTS)</b></td>
        <td>This is an Atlas specific permission for initiating settlements.</td>
      </tr>
      <tr>
        <td><b>Authorize settlements (AUTHORIZE_SETTLEMENTS)</b></td>
        <td>This is an Atlas specific permission for authorizing settlements after they've been proposed or accepted.</td>
      </tr>
    </table>


    There are also special vault permissions for enabled by Anchorage Digital on a per-organization basis:

    Additionally, there are global permissions which apply to the entire organization:


    <table>
      <tr>
        <td><b>Initiate withdrawals (INITIATE_WITHDRAWAL)</b></td>
        <td>Initiate withdrawals to external destinations. All withdrawals require quorum approval through the Anchorage Digital mobile app.</td>
      </tr>
      <tr>
        <td><b>Execute trades (TRADE)</b></td>
        <td>Request for quotes (RFQ) from the Anchorage Digital trading desk. Create and accept quotes. Read data of trades and settlements created by this key.</td>
      </tr>
      <tr>
        <td><b>Read trade activity (READ_TRADE)</b></td>
        <td>Read trade activity and trade settlements data of your organization.</td>
      </tr>
      <tr>
        <td><b>Read lending activity (LENDER_READ)</b></td>
        <td>Read lending activity of your organization.</td>
      </tr>
      <tr>
        <td><b>Read facility data (FACILITY_ONLY)</b></td>
        <td>Read lending facility data.</td>
      </tr>
      <tr>
        <td><b>Read deposit attribution activity (READ_DEPOSIT_ATTRIBUTION)</b></td>
        <td>Read deposit attribution activity of your organization.</td>
      </tr>
      <tr>
        <td><b>Manage deposit attributions (DEPOSIT_ATTRIBUTION)</b></td>
        <td>Read deposit attribution activity of your organization. Perform deposit attributions.</td>
      </tr>
      <tr>
        <td><b>Initiate Staking and Unstaking (STAKE)</b></td>
        <td>Initiate staking or unstaking operation. All operations require quorum approval through the Anchorage Digital mobile app.</td>
      </tr>
    </table>


    ### Example Workflow - Allow transfers from specific vaults

    To create an API key with the ability to transfer funds from an Anchorage Digital vaults or wallet, a permission group must first be created with the **Transfer funds** permission for the desired source vaults. Creating this permission group requires a quorum of approvals on the Anchorage Digital iOS app. Once the creation is confirmed, any number of API keys may be created with this permission group in the Anchorage Digital Web Dashboard under the API 2.0 section.

    To add additional permissions to the API key, update the associated permission group through the Anchorage Digital Web Dashboard. To revoke any permissions, the individual API key may be revoked, or the permission group may be updated or deleted to remove Transfer access.

    ## API Keys

    All API requests must be made over HTTPS and must include authentication using the following scheme.

    <!-- ReDoc-Inject: <security-definitions> -->

    ### Generating an API Key

    In order to make a valid API request, you must first create an API key. API keys can be created and managed in the Anchorage Digital Web Dashboard under the [API 2.0 tab](https://anchoragelogin.com/api). When you create an API key, there are 3 pieces of information you will need to remember:
      - API access key
      - Ed25519 public key (optional for read-only requests)
      - Ed25519 private/signing key (optional for read-only requests)

    You must generate an Ed25519 signing key pair and save the public portion in the Anchorage Digital Web Dashboard when creating the API access key. The signing key pair is used for added security with sensitive requests.

    Please note, Anchorage Digital cannot recover your API access key or private signing key if you forget them. You may generate a new access key and signing key at any time if you lose access.

    ### API Key Permissions

    Each API key is associated with a permission group. This permission group specifies the permitted actions for all associated API keys. Read more about permission groups [here](#section/Authentication-and-Security/Permission-Groups).

    ### Creating a request

    All requests must include the `Api-Access-Key` header, which contains your API access key as a string.

    Endpoints that require a signature must include the `Api-Signature` and `Api-Timestamp` headers. Read more about signatures [here](#section/Authentication-and-Security/Signatures).

    All request bodies must be valid JSON and have the content type `application/json`.

    ## Request Signatures

    Certain endpoints require an Ed25519 signature to be provided alongside the API key. These endpoints will specify the `Api-Signature` and `Api-Timestamp` headers as additional parameters.

    Signatures are optional unless explicitly required, but are encouraged for all requests. If a signature is provided, it will be verified.

    ### Signing Keys

    A signing key pair is generated by the user and the corresponding public key must be provided when creating an API key.

    When creating an API key, you will be prompted to provide an Ed25519 public key. You must use the associated Ed25519 signing key (private key) when creating signatures for requests from this API key.

    Please note that signing keys (Ed25519 private keys) should be stored securely by the user. The signing key should only be used to derive request signatures and should never be sent in a request. Anchorage Digital will never request you share your private key.

    ### Generating a Signing Key

    The user must securely generate an Ed25519 key pair on their own hardware and retain both the public and private portions. The Anchorage Digital API accepts a 64-character (32 bytes) hex-encoded Ed25519 public key when creating an API access key.


    #### Code sample (Python)

    *Generate a new signing key pair*

    ```python
    # https://pypi.org/project/PyNaCl/

    import nacl
    import nacl.signing
    import secrets

    seed = secrets.token_bytes(32)

    # Generate a new random signing key
    signing_key = nacl.signing.SigningKey(seed)

    # Obtain the hex-encoded signing key
    print('Signing key:')
    print(signing_key.encode().hex())

    # Obtain the hex-encoded verify key for the given signing key
    # Use this in the Anchorage Digital Web Dashboard when creating an API key
    print('Public key:')
    print(signing_key.verify_key.encode().hex())
    ```


    ### Signing a Request

    To sign a request, generate a request signature using the Ed25519 private (signing) key and provide it alongside the request in the `Api-Signature` header.

    To create a request signature, first concatenate the `timestamp`, `method`, `request path`, and `body` into a string. Then, create a signature of this message using the Ed25519 private key and hex-encode the output. Use this value as the `Api-Signature` header and use the `timestamp` value as the `Api-Timestamp` header.

    - The `method` is an uppercase HTTP method (ex. `GET`, `POST`, `DELETE`)
    - The `request path` should contain all query parameters (ex. `/v2/transfers?foo=bar&baz=bang`)
    - The `body` is a stringified HTTP request body
    - The `body` should be omitted if the request does not contain a body (ex. a `GET` or `DELETE` request)
    - The `timestamp` is the same as the `Api-Timestamp` header
    - The `timestamp` is a number of seconds since the Unix Epoch in UTC, and must be within one minute of the API service's time when the request is received

    ### Reference signature

    To verify your signature generation code is correct, generate a signature for the following request and timestamp using the provided signing key. If the generated signature matches the signature below, your signature generation code is correct.


    <table>
      <tr>
        <td>Timestamp</td>
        <td>1577880000</td>
      </tr>
      <tr>
        <td>HTTP Method (Uppercase)</td>
        <td>POST</td>
      </tr>
      <tr>
        <td>HTTP Path + query</td>
        <td>/v2/transfers?foo=bar&baz=bang</td>
      </tr>
      <tr>
        <td>HTTP Body</td>
        <td>{"source": {"id": "1c920f4241b78a1d483a29f3c24b6c4c", "type": "VAULT"}, "assetType": "ETH", "destination": {"id": "55e89d4a644d736b01533a2ea9b32a20", "type": "VAULT"}, "amount": "1000.00000000"}</td>
      </tr>
      <tr>
        <td>Signing Key (Ed25519 Private Key Seed)</td>
        <td>0101010101010101010101010101010101010101010101010101010101010101</td>
      </tr>
      <tr>
        <td>Public Key</td>
        <td>8a88e3dd7409f195fd52db2d3cba5d72ca6709bf1d94121bf3748801b40f6f5c</td>
      </tr>
      <tr>
        <td>Signature</td>
        <td>4bf42054bf7db1f8a2a2bc83d2a108502ee7a9d2ac7a2738adc2f932922446786fb9be1bd1eb475023296c6cba4ddbe28b04baca4b7521b1f1840a4ffd2b4d0d</td>
      </tr>
    </table>

    ## Reference clients

    ### Python (with `requests` library)

    *Authorize and sign requests*

    ```python

    # https://pypi.org/project/PyNaCl/

    from nacl import signing

    import time

    import requests


    class AnchorageAuth(requests.auth.AuthBase):
        ACCESS_KEY_HEADER = "Api-Access-Key"
        SIGNATURE_HEADER = "Api-Signature"
        TIMESTAMP_HEADER = "Api-Timestamp"

        access_key: str
        signing_key: signing.SigningKey

        def __init__(self, access_key: str, signing_key_seed: bytes):
            self.access_key = access_key
            self.signing_key = signing.SigningKey(signing_key_seed)

        def __call__(self, r: requests.PreparedRequest):
            r.headers[self.ACCESS_KEY_HEADER] = self.access_key

            timestamp = str(int(time.time()))
            method = r.method.upper() if r.method else "GET"
            body: bytes = bytes()
            if r.body and isinstance(r.body, bytes):
                body = r.body
            elif r.body and isinstance(r.body, str):
                body = bytearray(r.body, "utf-8")
            message = b"".join(
                [bytearray(timestamp, "utf-8"), bytearray(method, "utf-8"), bytearray(r.path_url, "utf-8"), body]
            )
            signature = self.signing_key.sign(message).signature.hex()
            r.headers[self.SIGNATURE_HEADER] = signature
            r.headers[self.TIMESTAMP_HEADER] = timestamp
            return r


    # load secrets

    # Use the API key generated in the Anchorage Digital Web Dashboard

    access_key = ...

    # Use the Ed25519 signing private key

    signing_key_str = ... # load the raw string

    signing_key = bytes(bytearray.fromhex(signing_key_str))

    data = {}

    anchorage_auth = AnchorageAuth(access_key, signing_key)

    r = requests.post("https://api.anchorage.com/v2/transfers", data=data, auth=anchorage_auth)

    ```

    ### Ruby - Reproduce reference signature
    ```ruby
      require "ed25519"
      require "net/http"
      require "time"

      def hex_to_bin(s)
          [s].pack('H*')
      end

      def bin_to_hex(s)
          s.unpack('H*').first
      end

      private_key_seed_hex = '0101010101010101010101010101010101010101010101010101010101010101'
      public_key_hex = '8a88e3dd7409f195fd52db2d3cba5d72ca6709bf1d94121bf3748801b40f6f5c'
      key_pair_hex = private_key_seed_hex + public_key_hex

      key_pair = hex_to_bin(key_pair_hex)

      signing_key = Ed25519::SigningKey.from_keypair(key_pair)

      timestamp = '1577880000' # Time.now.to_i.to_s

      req = Net::HTTP::Post.new('/v2/transfers?foo=bar&baz=bang')
      req.body = '{"source": {"id": "1c920f4241b78a1d483a29f3c24b6c4c", "type": "VAULT"}, "assetType": "ETH", "destination": {"id": "55e89d4a644d736b01533a2ea9b32a20", "type": VAULT"}, "amount": "1000.00000000"}'

      signature = signing_key.sign(timestamp + req.method + req.path + req.body)

      req['Api-Access-Key'] = 'YOUR_ACCESS_KEY'
      req['Api-Timestamp'] = timestamp
      req['Api-Signature'] = bin_to_hex(signature)

      puts bin_to_hex(signature)
    ```

    # Errors


    The Anchorage Digital API returns standard HTTP error codes for each API request.


    <table>
      <tr>
        <th style="width: 30%;">Response Code</th>
        <th>Description</th>
      <tr>
      <tr>
        <td>200 OK</td>
        <td>The request was successful.</td>
      </tr>
      <tr>
        <td>400 Bad Request</td>
        <td>The request was improperly formed and could not be understood by the server, often due to invalid syntax, insufficient funds, or a missing required parameter.</td>
      </tr>
      <tr>
        <td>401 Unauthorized</td>
        <td>The request was missing a valid API key.</td>
      </tr>
      <tr>
        <td>403 Forbidden</td>
        <td>The provided API key does not have permission to perform the requested action.</td>
      </tr>
      <tr>
        <td>404 Not Found</td>
        <td>The requested resource does not exist.</td>
      </tr>
      <tr>
        <td>409 Conflict</td>
        <td>The requested resource cannot proceed with the requested action because it is not in the required state.</td>
      </tr>
       <tr>
        <td>429 Too Many Requests</td>
        <td>Too many requests have been sent in a given amount of time.</td>
      </tr>
      <tr>
        <td>
          500 Internal Server Error
          <br />
          502 Bad Gateway
          <br />
          503 Service Unavailable
          <br />
          504 Gateway Timeout
        </td>
        <td>Something went wrong on Anchorage’s side. We have been alerted and are working on it.</td>
      </tr>
    </table>


    In addition to returning HTTP error codes for failed requests, the Anchorage Digital API includes a readable error message describing what went wrong in the response body.


    <SchemaDefinition schemaRef="#/components/schemas/ErrorDetails" showReadOnly={true} showWriteOnly={true} />


    # Idempotency


    Certain endpoints support idempotent requests so that a given request can be safely retried without performing the same operation twice. For example, if a request to transfer funds does not respond due to network issues, you can retry the request using the same idempotent ID to ensure that only one transfer is created.


    Endpoints that support idempotent requests have an optional `idempotentId` field that can be included in the body of the `POST` request. Provide a unique string using your method of choice (such as a v4 UUID).


    If a request is valid, Anchorage Digital will save the request indefinitely. If a subsequent request is received with the same `idempotentId` we will return the previously saved response for that `idempotentId`.


    # Rate Limits


    Keys provisioned by an Organization share one common rate limit. API requests are limited to 20 requests per second per Organization, allowing for bursts of up to 100 requests within a single second.


    # Pagination


    Cursor pagination is used for REST endpoints which return multiple data points. Pagination allows for fetching data after the current page and specifying how many records to return. The `next` cursor is available in responses with the `page` attribute. Requests should use the `next` cursor URL to query subsequent data. Query parameter `afterId` specifies the last record previously retrieved. Some endpoints instead use the `endDate` parameter to specify the end date and older for records to retrieve. Query parameter `limit` specifies the maximum number of records in a response.

    ## Parameters

    <table>
      <tr>
        <th style="width: 30%;">Parameter</th>
        <th>Description</th
      </tr>
      <tr>
        <td>afterId</td>
        <td>Request page after (older than) this pagination id.</td>
      </tr>
      <tr>
        <td>endDate</td>
        <td>Request records older than this date (YYYY-MM-DD format). Used for /trading/trades and /trading/settlements resources.</td>
      </tr>
      <tr>
        <td>limit</td>
        <td>Maximum number of results requested. Default usually 25, but varies depending on resource.</td>
      </tr>
    </table>

    ## Example

    `GET /v2/transfers?afterId=1968b94b09b8a1a8a381775d1f04978c424d891d50e517774bf984297985b471&limit=100`

    ## Next cursor

    The `next` cursor is a URL which references the last record in a set of records. When queried, the `next` cursor URL will return subsequent records, but otherwise using the same query parameters.
servers:
  - url: 'https://api.anchorage-staging.com/v2'
paths:
  /apikey:
    get:
      operationId: getAPIKeyInfo
      summary: List information for current API key
      description: |
        Permissions required: none


        Get the user information for your API key.

        As with any endpoint, a signature included in the request will be validated. This can be used to confirm the associated signing key as well information about the current API key.
      parameters: []
      responses:
        '200':
          description: Information for current API key
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/APIKeyInfoResponse'
        '401':
          description: Unauthenticated
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorDetails'
        '403':
          description: Forbidden
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorDetails'
        '429':
          description: Too Many Requests
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorDetails'
        '500':
          description: Internal Server Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorDetails'
      tags:
        - API Key
  /atlas/settlements:
    post:
      operationId: proposeSNSettlement
      summary: Propose a settlement
      description: "Permissions required: **Propose and Accept settlements**\n\n\nPropose a settlement with a counterparty for a list of assets coming from and/or arriving into wallets owned by your participant.\n\nPositive amounts indicate funds to be received and negative amounts indicate funds to be sent.\n\n```json\n[\n\t{\n\t\t\"walletId\": \"d4578f401daadff65615236c5ad1e12c\",\n\t\t\"quantity\": \"-1.1\",\n\t\t\"assetType\": \"BTC\"\n\t},\n\t{\n\t\t\"walletId\": \"43a9aeac02c851f4868f9d89aabde494\",\n\t\t\"quantity\": \"20.62\",\n\t\t\"assetType\": \"ETH\"\n\t}\n]\n```\nFor example, the above wallet amounts indicate you will send 1.1 BTC from your wallet `d4578f401daadff65615236c5ad1e12c` and receive 20.62 ETH into your wallet `43a9aeac02c851f4868f9d89aabde494`.\n\nThe steps to create a settlement are:\n1. The proposer participant proposes it, selecting an acceptor, assets, amounts and wallets.\n2. The proposer authorizes it, either through the API or mobile app signing.\n3. The acceptor participant accepts it, selecting wallets to use.\n4. (optional) The acceptor authorizes it, either through the API or mobile app signing.\n5. The settlement is funded in the sending wallets.\n6. The assets are transferred on-chain, as directed by the settlement.\n\nSteps 2 or 3 can happen out of order.\nStep 4 is skipped if the acceptor is not sending any assets.\nThe settlement stays in the `ActionNeeded` state until it reaches step 6. Then it enters the `Executing` state and, after that, it enters one of the final states."
      parameters:
        - name: Api-Signature
          in: header
          description: |
            A hex-encoded Ed25519 signature of `timestamp_epoch_seconds + uppercase(http_method) + request_path + request_body`.



            Construction example:

              ```
              toHex(
                ed25519Sign(
                  signing_key,
                  '{}{}{}{}'.format(timestamp_epoch_seconds, toUpper(httpMethod), httpRequestPath, httpBody)
                )
              )
              ```
          required: true
          schema:
            type: string
            pattern: '^[0-9A-Fa-f]{128,160}$'
        - name: Api-Timestamp
          in: header
          description: 'Current timestamp, represented as unix epoch seconds'
          required: true
          schema:
            type: integer
            format: int64
      requestBody:
        description: Settlement proposal
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/SNSettlementProposal'
      responses:
        '201':
          description: settlementId
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/SNProposeSettlementResponse'
        '400':
          description: Bad Request
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorDetails'
        '401':
          description: Unauthenticated
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorDetails'
        '403':
          description: Forbidden
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorDetails'
        '429':
          description: Too Many Requests
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorDetails'
        '500':
          description: Internal Server Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorDetails'
      tags:
        - Atlas Settlement Network
    get:
      operationId: getSNSettlements
      summary: List settlements
      description: |-
        Permissions required: **Read vault activity**


        Get settlements proposed by you or proposed to you.
      parameters:
        - name: afterId
          in: query
          description: When paginating this is used to provide the starting point for the page to fetch (retrieved from the previous response body)
          schema:
            type: string
        - name: limit
          in: query
          description: Maximum number of results to return per query
          schema:
            type: integer
            format: int64
            default: 30
            maximum: 100
            minimum: 1
      responses:
        '200':
          description: settlements
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/SNSettlementsResponse'
        '401':
          description: Unauthenticated
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorDetails'
        '403':
          description: Forbidden
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorDetails'
        '429':
          description: Too Many Requests
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorDetails'
        '500':
          description: Internal Server Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorDetails'
      tags:
        - Atlas Settlement Network
  '/atlas/settlements/{settlementId}/reject':
    post:
      operationId: rejectSNSettlement
      summary: Reject a settlement proposal
      description: |-
        Permissions required: **Propose and Accept settlements** or **Authorize Settlements**


        Rejects a proposed settlement for your Atlas participant. Proposed settlements cannot be rejected if they have already been authorized.
      parameters:
        - name: settlementId
          in: path
          description: ID of settlement to reject
          required: true
          schema:
            type: string
        - name: Api-Signature
          in: header
          description: |
            A hex-encoded Ed25519 signature of `timestamp_epoch_seconds + uppercase(http_method) + request_path + request_body`.



            Construction example:

              ```
              toHex(
                ed25519Sign(
                  signing_key,
                  '{}{}{}{}'.format(timestamp_epoch_seconds, toUpper(httpMethod), httpRequestPath, httpBody)
                )
              )
              ```
          required: true
          schema:
            type: string
            pattern: '^[0-9A-Fa-f]{128,160}$'
        - name: Api-Timestamp
          in: header
          description: 'Current timestamp, represented as unix epoch seconds'
          required: true
          schema:
            type: integer
            format: int64
      responses:
        '200':
          description: ''
        '400':
          description: Bad Request
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorDetails'
        '401':
          description: Unauthenticated
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorDetails'
        '403':
          description: Forbidden
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorDetails'
        '404':
          description: Not Found
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorDetails'
        '409':
          description: Conflict
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorDetails'
        '429':
          description: Too Many Requests
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorDetails'
        '500':
          description: Internal Server Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorDetails'
      tags:
        - Atlas Settlement Network
  '/atlas/settlements/{settlementId}/authorize':
    post:
      operationId: authorizeSNSettlement
      summary: Authorize a settlement
      description: |-
        Permissions required: **Authorize Settlements**


        After your participant has proposed a settlement or accepted a settlement proposal, the details of the settlement must be authorized.

        To authorize via API, the API key must have a special permission. Otherwise, authorization takes place in the app according to organization policy.
      parameters:
        - name: settlementId
          in: path
          description: ID of settlement to authorize
          required: true
          schema:
            type: string
        - name: participantId
          in: query
          description: ID of participant authorizing the settlement
          required: true
          schema:
            type: string
        - name: Api-Signature
          in: header
          description: |
            A hex-encoded Ed25519 signature of `timestamp_epoch_seconds + uppercase(http_method) + request_path + request_body`.



            Construction example:

              ```
              toHex(
                ed25519Sign(
                  signing_key,
                  '{}{}{}{}'.format(timestamp_epoch_seconds, toUpper(httpMethod), httpRequestPath, httpBody)
                )
              )
              ```
          required: true
          schema:
            type: string
            pattern: '^[0-9A-Fa-f]{128,160}$'
        - name: Api-Timestamp
          in: header
          description: 'Current timestamp, represented as unix epoch seconds'
          required: true
          schema:
            type: integer
            format: int64
      requestBody:
        description: Settlement proposal
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/SNSettlementAuthorization'
      responses:
        '200':
          description: ''
        '400':
          description: Bad Request
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorDetails'
        '401':
          description: Unauthenticated
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorDetails'
        '403':
          description: Forbidden
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorDetails'
        '404':
          description: Not Found
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorDetails'
        '409':
          description: Conflict
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorDetails'
        '429':
          description: Too Many Requests
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorDetails'
        '500':
          description: Internal Server Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorDetails'
      tags:
        - Atlas Settlement Network
  '/atlas/settlements/{settlementId}/accept':
    post:
      operationId: acceptSNSettlement
      summary: Accept a settlement
      description: |-
        Permissions required: **Propose and Accept settlements** and **Read vault activity**


        Accept a proposed settlement and select wallets to receive funds to and/or send funds from.
      parameters:
        - name: settlementId
          in: path
          description: ID of settlement to authorize
          required: true
          schema:
            type: string
        - name: Api-Signature
          in: header
          description: |
            A hex-encoded Ed25519 signature of `timestamp_epoch_seconds + uppercase(http_method) + request_path + request_body`.



            Construction example:

              ```
              toHex(
                ed25519Sign(
                  signing_key,
                  '{}{}{}{}'.format(timestamp_epoch_seconds, toUpper(httpMethod), httpRequestPath, httpBody)
                )
              )
              ```
          required: true
          schema:
            type: string
            pattern: '^[0-9A-Fa-f]{128,160}$'
        - name: Api-Timestamp
          in: header
          description: 'Current timestamp, represented as unix epoch seconds'
          required: true
          schema:
            type: integer
            format: int64
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/SNAcceptSettlementRequest'
      responses:
        '200':
          description: ''
        '400':
          description: Bad Request
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorDetails'
        '401':
          description: Unauthenticated
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorDetails'
        '403':
          description: Forbidden
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorDetails'
        '404':
          description: Not Found
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorDetails'
        '409':
          description: Conflict
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorDetails'
        '429':
          description: Too Many Requests
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorDetails'
        '500':
          description: Internal Server Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorDetails'
      tags:
        - Atlas Settlement Network
  '/atlas/settlements/{settlementId}':
    get:
      operationId: getSNSettlement
      summary: Get a settlement by ID
      description: |-
        Permissions required: **Read vault activity**


        Get a single settlement by its ID.
      parameters:
        - name: settlementId
          in: path
          description: ID of settlement to fetch
          required: true
          schema:
            type: string
      responses:
        '200':
          description: settlement
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/SNSettlementResponse'
        '401':
          description: Unauthenticated
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorDetails'
        '403':
          description: Forbidden
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorDetails'
        '404':
          description: Not Found
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorDetails'
        '429':
          description: Too Many Requests
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorDetails'
        '500':
          description: Internal Server Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorDetails'
      tags:
        - Atlas Settlement Network
  /atlas/directory/counterparties:
    post:
      operationId: proposeSNTrustedCounterparty
      summary: Propose a trusted counterparty
      description: |-
        Permissions required: **Propose Trusted Counterparty**


        Propose adding a new trusted counterparty for a participant.
      parameters:
        - name: Api-Signature
          in: header
          description: |
            A hex-encoded Ed25519 signature of `timestamp_epoch_seconds + uppercase(http_method) + request_path + request_body`.



            Construction example:

              ```
              toHex(
                ed25519Sign(
                  signing_key,
                  '{}{}{}{}'.format(timestamp_epoch_seconds, toUpper(httpMethod), httpRequestPath, httpBody)
                )
              )
              ```
          required: true
          schema:
            type: string
            pattern: '^[0-9A-Fa-f]{128,160}$'
        - name: Api-Timestamp
          in: header
          description: 'Current timestamp, represented as unix epoch seconds'
          required: true
          schema:
            type: integer
            format: int64
      requestBody:
        description: Trusted counterparty proposal
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/SNTrustedCounterpartyProposal'
      responses:
        '201':
          description: ''
        '400':
          description: Bad Request
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorDetails'
        '401':
          description: Unauthenticated
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorDetails'
        '403':
          description: Forbidden
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorDetails'
        '429':
          description: Too Many Requests
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorDetails'
        '500':
          description: Internal Server Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorDetails'
      tags:
        - Atlas Settlement Network
    get:
      operationId: getSNTrustedCounterparties
      summary: List trusted counterparties
      description: |-
        Permissions required: **Read vault activity**


        Get trusted counterparties.
      parameters:
        - name: participantId
          in: query
          description: ID of the participant this trusted counterparty is for
          required: true
          schema:
            type: string
        - name: limit
          in: query
          description: Maximum number of results to return per query
          schema:
            type: integer
            format: int64
            default: 30
            maximum: 100
            minimum: 1
        - name: afterId
          in: query
          description: When paginating this is used to provide the starting point for the page to fetch (retrieved from the previous response body)
          schema:
            type: string
      responses:
        '200':
          description: counterparties
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/SNTrustedCounterpartiesResponse'
        '401':
          description: Unauthenticated
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorDetails'
        '403':
          description: Forbidden
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorDetails'
        '429':
          description: Too Many Requests
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorDetails'
        '500':
          description: Internal Server Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorDetails'
      tags:
        - Atlas Settlement Network
  '/atlas/directory/counterparties/{counterpartyId}':
    get:
      operationId: getSNTrustedCounterparty
      summary: Get a counterparty by ID
      description: |-
        Permissions required: **Read vault activity**


        Get a single trusted counterparty by its ID.
      parameters:
        - name: counterpartyId
          in: path
          description: ID of trusted counterparty to fetch
          required: true
          schema:
            type: string
        - name: participantId
          in: query
          description: ID of the participant this trusted counterparty is for
          required: true
          schema:
            type: string
      responses:
        '200':
          description: counterparty
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/SNTrustedCounterpartyResponse'
        '401':
          description: Unauthenticated
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorDetails'
        '403':
          description: Forbidden
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorDetails'
        '404':
          description: Not Found
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorDetails'
        '429':
          description: Too Many Requests
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorDetails'
        '500':
          description: Internal Server Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorDetails'
      tags:
        - Atlas Settlement Network
  '/atlas/directory/participants/{participantId}':
    get:
      operationId: getSNParticipant
      summary: Get a participant by ID
      description: |-
        Permissions required: **Read vault activity**

        Get a single participant by its ID.
      parameters:
        - name: participantId
          in: path
          description: ID of participant to fetch
          required: true
          schema:
            type: string
      responses:
        '200':
          description: participant
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/SNParticipantResponse'
        '401':
          description: Unauthenticated
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorDetails'
        '403':
          description: Forbidden
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorDetails'
        '404':
          description: Not Found
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorDetails'
        '429':
          description: Too Many Requests
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorDetails'
        '500':
          description: Internal Server Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorDetails'
      tags:
        - Atlas Settlement Network
  /atlas/directory/participants:
    get:
      operationId: getSNParticipants
      summary: List participants
      description: |-
        Permissions required: **Read vault activity**


        Get the list of participants you have access to.
      parameters:
        - name: limit
          in: query
          description: Maximum number of results to return per query
          schema:
            type: integer
            format: int64
            default: 30
            maximum: 100
            minimum: 1
        - name: afterId
          in: query
          description: When paginating this is used to provide the starting point for the page to fetch (retrieved from the previous response body)
          schema:
            type: string
      responses:
        '200':
          description: participants
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/SNParticipantsResponse'
        '401':
          description: Unauthenticated
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorDetails'
        '403':
          description: Forbidden
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorDetails'
        '429':
          description: Too Many Requests
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorDetails'
        '500':
          description: Internal Server Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorDetails'
      tags:
        - Atlas Settlement Network
  /collateral_management/packages:
    get:
      operationId: getCMPackages
      summary: List packages
      description: |-
        Permissions required: **Read vault activity**


        Get collateral packages.
      parameters:
        - name: afterId
          in: query
          description: When paginating this is used to provide the starting point for the page to fetch (retrieved from the previous response body)
          schema:
            type: string
        - name: limit
          in: query
          description: Maximum number of results to return per query
          schema:
            type: integer
            format: int64
            default: 30
            maximum: 100
            minimum: 1
      responses:
        '200':
          description: packages
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/CMPackagesResponse'
        '401':
          description: Unauthenticated
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorDetails'
        '403':
          description: Forbidden
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorDetails'
        '429':
          description: Too Many Requests
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorDetails'
        '500':
          description: Internal Server Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorDetails'
      tags:
        - Collateral Management
    post:
      operationId: createCMPackage
      summary: Create a new collateral package
      description: |-
        Permissions required: **Manage Collateral Packages** and **Read vault activity**


        Creates a new collateral package in the Collateral Management service.
      parameters:
        - name: Api-Signature
          in: header
          description: |
            A hex-encoded Ed25519 signature of `timestamp_epoch_seconds + uppercase(http_method) + request_path + request_body`.



            Construction example:

              ```
              toHex(
                ed25519Sign(
                  signing_key,
                  '{}{}{}{}'.format(timestamp_epoch_seconds, toUpper(httpMethod), httpRequestPath, httpBody)
                )
              )
              ```
          required: true
          schema:
            type: string
            pattern: '^[0-9A-Fa-f]{128,160}$'
        - name: Api-Timestamp
          in: header
          description: 'Current timestamp, represented as unix epoch seconds'
          required: true
          schema:
            type: integer
            format: int64
      requestBody:
        description: The details for creating a new collateral package
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/CMCreatePackageRequest'
      responses:
        '201':
          description: Successfully created collateral package
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/CreateCMPackageResponse'
        '400':
          description: Bad Request
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorDetails'
        '401':
          description: Unauthenticated
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorDetails'
        '403':
          description: Forbidden
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorDetails'
        '422':
          description: Unprocessable Entity
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorDetails'
        '429':
          description: Too Many Requests
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorDetails'
        '500':
          description: Internal Server Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorDetails'
      tags:
        - Collateral Management
  '/collateral_management/packages/{packageId}':
    patch:
      operationId: updateCMPackage
      summary: Update a collateral package
      description: |-
        Permissions required: **Manage Collateral Packages** and **Read vault activity**


        Updates an existing collateral package in the Collateral Management service.
      parameters:
        - name: packageId
          in: path
          description: The unique identifier of the package to update.
          required: true
          schema:
            type: string
        - name: Api-Signature
          in: header
          description: |
            A hex-encoded Ed25519 signature of `timestamp_epoch_seconds + uppercase(http_method) + request_path + request_body`.



            Construction example:

              ```
              toHex(
                ed25519Sign(
                  signing_key,
                  '{}{}{}{}'.format(timestamp_epoch_seconds, toUpper(httpMethod), httpRequestPath, httpBody)
                )
              )
              ```
          required: true
          schema:
            type: string
            pattern: '^[0-9A-Fa-f]{128,160}$'
        - name: Api-Timestamp
          in: header
          description: 'Current timestamp, represented as unix epoch seconds'
          required: true
          schema:
            type: integer
            format: int64
      requestBody:
        description: The details for updating an existing collateral package
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/CMUpdatePackageRequest'
      responses:
        '200':
          description: Successfully updated collateral package
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/UpdateCMPackageResponse'
        '400':
          description: Bad Request
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorDetails'
        '401':
          description: Unauthenticated
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorDetails'
        '403':
          description: Forbidden
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorDetails'
        '404':
          description: The specified package was not found.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorDetails'
        '422':
          description: Unprocessable Entity
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorDetails'
        '429':
          description: Too Many Requests
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorDetails'
        '500':
          description: Internal Server Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorDetails'
      tags:
        - Collateral Management
  /collateral_management/exposures:
    get:
      operationId: getCMExposures
      summary: List exposures
      description: |-
        Permissions required: **Read vault activity**


        Get Exposures.
      parameters:
        - name: afterId
          in: query
          description: When paginating this is used to provide the starting point for the page to fetch (retrieved from the previous response body)
          schema:
            type: string
        - name: limit
          in: query
          description: Maximum number of results to return per query
          schema:
            type: integer
            format: int64
            default: 30
            maximum: 100
            minimum: 1
      responses:
        '200':
          description: exposures
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/CMExposuresResponse'
        '401':
          description: Unauthenticated
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorDetails'
        '403':
          description: Forbidden
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorDetails'
        '429':
          description: Too Many Requests
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorDetails'
        '500':
          description: Internal Server Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorDetails'
      tags:
        - Collateral Management
    post:
      operationId: createCMExposure
      summary: Create a new exposure
      description: |-
        Permissions required: **Manage Collateral Exposures** and **Read vault activity**

        Creates a new exposure in the Collateral Management service.
      parameters:
        - name: Api-Signature
          in: header
          description: |
            A hex-encoded Ed25519 signature of `timestamp_epoch_seconds + uppercase(http_method) + request_path + request_body`.



            Construction example:

              ```
              toHex(
                ed25519Sign(
                  signing_key,
                  '{}{}{}{}'.format(timestamp_epoch_seconds, toUpper(httpMethod), httpRequestPath, httpBody)
                )
              )
              ```
          required: true
          schema:
            type: string
            pattern: '^[0-9A-Fa-f]{128,160}$'
        - name: Api-Timestamp
          in: header
          description: 'Current timestamp, represented as unix epoch seconds'
          required: true
          schema:
            type: integer
            format: int64
      requestBody:
        description: The details for creating a new collateral exposure
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/CMCreateExposureRequest'
      responses:
        '201':
          description: Successfully created collateral exposure
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/CMCreateExposureResponse'
        '400':
          description: Bad Request
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorDetails'
        '401':
          description: Unauthenticated
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorDetails'
        '403':
          description: Forbidden
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorDetails'
        '422':
          description: Unprocessable Entity
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorDetails'
        '429':
          description: Too Many Requests
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorDetails'
        '500':
          description: Internal Server Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorDetails'
      tags:
        - Collateral Management
  '/collateral_management/operations/{operationId}':
    patch:
      operationId: updateCMOperation
      summary: Update an operation
      description: |-
        Permissions required: **Manage Collateral Packages** and **Read vault activity**


        Update an existing operation in the Collateral Management service.
        Only the fields provided in the request body will be updated.
      parameters:
        - name: operationId
          in: path
          description: The unique identifier of the operation to update.
          required: true
          schema:
            type: string
        - name: Api-Signature
          in: header
          description: |
            A hex-encoded Ed25519 signature of `timestamp_epoch_seconds + uppercase(http_method) + request_path + request_body`.



            Construction example:

              ```
              toHex(
                ed25519Sign(
                  signing_key,
                  '{}{}{}{}'.format(timestamp_epoch_seconds, toUpper(httpMethod), httpRequestPath, httpBody)
                )
              )
              ```
          required: true
          schema:
            type: string
            pattern: '^[0-9A-Fa-f]{128,160}$'
        - name: Api-Timestamp
          in: header
          description: 'Current timestamp, represented as unix epoch seconds'
          required: true
          schema:
            type: integer
            format: int64
      requestBody:
        description: The fields to update on the operation.
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/CMUpdateOperationRequest'
      responses:
        '200':
          description: The updated operation.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/UpdateCMOperationResponse'
        '401':
          description: Unauthenticated
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorDetails'
        '403':
          description: Forbidden
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorDetails'
        '404':
          description: The specified operation was not found.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorDetails'
        '429':
          description: Too Many Requests
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorDetails'
        '500':
          description: Internal Server Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorDetails'
      tags:
        - Collateral Management
  /collateral_management/operations:
    post:
      operationId: createCMOperation
      summary: Create a new operation
      description: |-
        Permissions required: **Manage Collateral Packages** and **Read vault activity**


        Create a new operation in the Collateral Management service.
      parameters:
        - name: Api-Signature
          in: header
          description: |
            A hex-encoded Ed25519 signature of `timestamp_epoch_seconds + uppercase(http_method) + request_path + request_body`.



            Construction example:

              ```
              toHex(
                ed25519Sign(
                  signing_key,
                  '{}{}{}{}'.format(timestamp_epoch_seconds, toUpper(httpMethod), httpRequestPath, httpBody)
                )
              )
              ```
          required: true
          schema:
            type: string
            pattern: '^[0-9A-Fa-f]{128,160}$'
        - name: Api-Timestamp
          in: header
          description: 'Current timestamp, represented as unix epoch seconds'
          required: true
          schema:
            type: integer
            format: int64
      requestBody:
        description: Operation details
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/CMCreateOperationRequest'
      responses:
        '201':
          description: operationId
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/CMOperationResponse'
        '400':
          description: Bad Request
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorDetails'
        '401':
          description: Unauthenticated
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorDetails'
        '403':
          description: Forbidden
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorDetails'
        '429':
          description: Too Many Requests
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorDetails'
        '500':
          description: Internal Server Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorDetails'
      tags:
        - Collateral Management
    get:
      operationId: getCMOperations
      summary: List collateral and exposure operations
      description: |-
        Permissions required: **Read vault activity**


        Get all the operations that were booked for collateral packages and exposures.
      parameters:
        - name: afterId
          in: query
          description: When paginating this is used to provide the starting point for the page to fetch (retrieved from the previous response body)
          schema:
            type: string
        - name: limit
          in: query
          description: Maximum number of results to return per query
          schema:
            type: integer
            format: int64
            default: 100
            maximum: 100
            minimum: 1
      responses:
        '200':
          description: operations
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/CMOperationsResponse'
        '401':
          description: Unauthenticated
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorDetails'
        '403':
          description: Forbidden
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorDetails'
        '429':
          description: Too Many Requests
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorDetails'
        '500':
          description: Internal Server Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorDetails'
      tags:
        - Collateral Management
  /collateral_management/price_sources:
    get:
      operationId: getCMPriceSources
      summary: Get available assets for specific price sources
      description: |-
        Permissions required: **Read vault activity**


        Returns the assets (trading pairs) available for specific price sources (exchanges).
        This endpoint queries live price data from the Kafka cache and returns supported exchanges.

        Optionally filter by a specific exchange using the 'exchange' query parameter.
      parameters:
        - name: exchange
          in: query
          description: Optional filter to return data for a specific exchange only.
          required: false
          schema:
            $ref: '#/components/schemas/CMPriceSource'
      responses:
        '200':
          description: Price sources with their available assets
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/CMPriceSourcesResponse'
        '401':
          description: Unauthenticated
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorDetails'
        '403':
          description: Forbidden
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorDetails'
        '404':
          description: Requested exchange is not available or not in the supported list
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorDetails'
        '429':
          description: Too Many Requests
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorDetails'
        '500':
          description: Internal Server Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorDetails'
        '501':
          description: Not Implemented - collateral management price sources feature is disabled
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorDetails'
      tags:
        - Collateral Management
  '/collateral_management/packages/{packageId}/requests/margin-return':
    post:
      operationId: requestCMMarginReturn
      summary: Request a margin return
      description: "Permissions required: **Manage Collateral Packages** and **Read vault activity**\n\n\nInitiate a margin return: a decrease in the collateral held against a collateral package by returning a list of assets from the secured party's collateral wallets to the pledgor's return wallets. The package must be in `MARGIN_RETURN` state.\n\nA margin return is fulfilled by creating a two-way Atlas settlement. Unlike a freeform settlement proposal, the counterparty, vault, and the wallets on both sides are not supplied by the caller — they are resolved from the collateral package's asset tracking configuration. The caller only specifies which assets and amounts to return.\n\n```json\n{\n\t\"assetAmounts\": [\n\t\t{ \"assetTypeID\": \"BTC\", \"value\": \"1.1\" },\n\t\t{ \"assetTypeID\": \"ETH\", \"value\": \"20.62\" }\n\t],\n\t\"idempotencyKey\": \"my-unique-request-id-001\",\n\t\"useGasStation\": false\n}\n```\n\nFor example, the above request returns 1.1 BTC and 20.62 ETH from the secured party's collateral wallets for this package to the pledgor's configured return wallets.\n\nEither the pledgor or the secured party may initiate the margin return. When the pledgor calls this endpoint, the pledgor becomes the proposer of the underlying settlement and the associated collateral org becomes the acceptor. When the secured party calls this endpoint, the associated collateral org becomes the proposer of the underlying settlement and the pledgor becomes the acceptor. The direction of funds is always the same: assets move from the secured party's collateral wallets to the pledgor's return wallets, regardless of who initiated.\n\nThe steps to complete a margin return are:\n1. The initiator (pledgor or secured party) requests the margin return via this endpoint, specifying assets and amounts. If the pledgor initiates, the pledgor is the settlement proposer and the collateral org is the acceptor. If the secured party initiates, the collateral org is the settlement proposer and the pledgor is the acceptor. Both sides' wallets are resolved automatically from the package configuration.\n2. The initiator authorizes the settlement, either through the API or mobile app signing.\n3. [Optional] The counterparty authorizes the settlement, either through the API or mobile app signing.\n4. The settlement is funded from the secured party's collateral wallets.\n5. The assets are transferred on-chain to the pledgor's return wallets.\n\nSteps 2 and 3 can happen out of order.\nStep 3 only happens if the pledgor initiates\nThe settlement stays in the `ActionNeeded` state until it reaches step 4. Then it enters the `Executing` state and, after that, it enters one of the final states."
      parameters:
        - name: packageId
          in: path
          description: The unique identifier of the collateral package to request a margin return on.
          required: true
          schema:
            type: string
        - name: Api-Signature
          in: header
          description: |
            A hex-encoded Ed25519 signature of `timestamp_epoch_seconds + uppercase(http_method) + request_path + request_body`.



            Construction example:

              ```
              toHex(
                ed25519Sign(
                  signing_key,
                  '{}{}{}{}'.format(timestamp_epoch_seconds, toUpper(httpMethod), httpRequestPath, httpBody)
                )
              )
              ```
          required: true
          schema:
            type: string
            pattern: '^[0-9A-Fa-f]{128,160}$'
        - name: Api-Timestamp
          in: header
          description: 'Current timestamp, represented as unix epoch seconds'
          required: true
          schema:
            type: integer
            format: int64
      requestBody:
        description: The details for requesting a margin return
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/CMMarginReturnRequest'
      responses:
        '201':
          description: Successfully requested margin return
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/CMMarginReturnResponse'
        '400':
          description: Bad Request
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorDetails'
        '401':
          description: Unauthenticated
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorDetails'
        '403':
          description: Forbidden
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorDetails'
        '422':
          description: Unprocessable Entity
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorDetails'
        '429':
          description: Too Many Requests
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorDetails'
        '500':
          description: Internal Server Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorDetails'
      tags:
        - Collateral Management
  '/collateral_management/packages/{packageId}/requests/pay-up':
    post:
      operationId: requestCMPayUp
      summary: Request a pay-up (exposure increase)
      description: "Permissions required: **Manage Collateral Packages** and **Read vault activity**\n\n\nInitiate a pay-up: an increase in exposure on a collateral package by sending additional loan funds from the secured party to the pledgor's preconfigured disbursement wallet for each requested exposure asset. The package must be in `HEALTHY` or `MARGIN_RETURN` state, and the increase must not push the package's projected state out of those two states.\n\nA pay-up is fulfilled by creating a two-way Atlas settlement. In both cases below, the pledgor's destination wallet is not supplied by the caller — it is resolved from each requested asset's exposure configuration.\n\nEither the pledgor or the secured party may initiate a pay-up:\n- **Pledgor-initiated**: the pledgor is the settlement proposer; the secured party is the acceptor and endorses the settlement, picking their own source wallet at that time. Leave `sourceWalletID` unset on every asset amount.\n- **Secured-party-initiated**: the secured party is the proposer and supplies `sourceWalletID` on every asset amount — the wallet the funds are drawn from. This is a one-way send; no pledgor endorsement is required.\n\n```json\n{\n\t\"assetAmounts\": [\n\t\t{ \"assetTypeID\": \"BTC\", \"value\": \"1.1\" }\n\t],\n\t\"idempotencyKey\": \"my-unique-request-id-001\",\n\t\"useGasStation\": false\n}\n```\n\nThe steps to complete a pledgor-initiated pay-up are:\n1. The pledgor requests the pay-up via this endpoint, specifying assets and amounts. The pledgor's destination wallet is resolved automatically from the exposure's disbursement wallet configuration.\n2. The pledgor authorizes the settlement, either through the API or mobile app signing.\n3. The secured party authorizes the settlement, selecting their own source wallet at that time.\n4. The settlement is funded from the secured party's chosen source wallet.\n5. The assets are transferred on-chain to the pledgor's disbursement wallet.\n\nA secured-party-initiated pay-up skips steps 2-3: the settlement is created already funded from the caller-supplied `sourceWalletID` and requires no pledgor endorsement.\n\nA pledgor-initiated settlement stays in the `ActionNeeded` state until the secured party authorizes it, then enters `Executing`. A secured-party-initiated settlement enters `Executing` immediately. Both reach one of the final states after that."
      parameters:
        - name: packageId
          in: path
          description: The unique identifier of the collateral package to request a pay-up on.
          required: true
          schema:
            type: string
        - name: Api-Signature
          in: header
          description: |
            A hex-encoded Ed25519 signature of `timestamp_epoch_seconds + uppercase(http_method) + request_path + request_body`.



            Construction example:

              ```
              toHex(
                ed25519Sign(
                  signing_key,
                  '{}{}{}{}'.format(timestamp_epoch_seconds, toUpper(httpMethod), httpRequestPath, httpBody)
                )
              )
              ```
          required: true
          schema:
            type: string
            pattern: '^[0-9A-Fa-f]{128,160}$'
        - name: Api-Timestamp
          in: header
          description: 'Current timestamp, represented as unix epoch seconds'
          required: true
          schema:
            type: integer
            format: int64
      requestBody:
        description: The details for requesting a pay-up
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/CMPayUpRequest'
      responses:
        '201':
          description: Successfully requested pay-up
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/CMPayUpResponse'
        '400':
          description: Bad Request
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorDetails'
        '401':
          description: Unauthenticated
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorDetails'
        '403':
          description: Forbidden
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorDetails'
        '422':
          description: Unprocessable Entity
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorDetails'
        '429':
          description: Too Many Requests
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorDetails'
        '500':
          description: Internal Server Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorDetails'
      tags:
        - Collateral Management
  /deposit-attributions/attributions:
    get:
      operationId: getDepositAttributions
      summary: List deposit attributions
      description: |+
        Permissions required: **Read Deposit Attribution** or **Deposit Attribution**.


        Returns all Deposit Attributions for an Organization based on the provided query parameters.


        Default sorting will be ascending order by createdAt.

      parameters:
        - name: afterId
          in: query
          description: When paginating this is used to provide the starting point for the page to fetch (retrieved from the previous response body).
          required: false
          schema:
            type: string
        - name: limit
          in: query
          description: Maximum number of results to return per query.
          schema:
            type: integer
            format: int64
            default: 25
            maximum: 100
            minimum: 1
        - name: status
          in: query
          description: Filter by pending or attributed deposits.
          required: false
          schema:
            type: string
            enum:
              - ATTRIBUTED
              - PENDING
              - UNDER_REVIEW
              - BLOCKED
              - NON_ATTRIBUTABLE
              - INITIATED
        - name: startDateTime
          in: query
          description: 'The start date-time (exclusive) of the deposit attribution process in UTC following [RFC 3339](https://datatracker.ietf.org/doc/html/rfc3339#section-5.6) ''date-time'' format. A valid format example is `2021-01-01T00:00:00.000000Z`.'
          required: false
          schema:
            type: string
            format: date-time
        - name: endDateTime
          in: query
          description: 'The end date-time (exclusive) to consider the start of the deposit attribution process in UTC following [RFC 3339](https://datatracker.ietf.org/doc/html/rfc3339#section-5.6) ''date-time'' format. A valid format example is `2021-01-01T00:00:00.000000Z`.'
          required: false
          schema:
            type: string
            format: date-time
        - name: attributedAtStartDateTime
          in: query
          description: 'The start date-time (exclusive) to consider the attribution date of the deposit in UTC following [RFC 3339](https://datatracker.ietf.org/doc/html/rfc3339#section-5.6) ''date-time'' format. A valid format example is `2021-01-01T00:00:00.000000Z`.'
          required: false
          schema:
            type: string
            format: date-time
        - name: attributedAtEndDateTime
          in: query
          description: 'The end date-time (exclusive) to consider the attribution date of the deposit in UTC following [RFC 3339](https://datatracker.ietf.org/doc/html/rfc3339#section-5.6) ''date-time'' format. A valid format example is `2021-01-01T00:00:00.000000Z`.'
          required: false
          schema:
            type: string
            format: date-time
        - name: subaccountIds
          in: query
          description: Filter results to deposits associated with the specified subaccounts. Multiple values may be provided.
          required: false
          schema:
            type: array
            items:
              type: string
          explode: true
          style: form
      responses:
        '200':
          description: Success
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/DepositAttributionResponse'
        '400':
          description: BadRequest
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorDetails'
        '401':
          description: Unauthenticated
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorDetails'
        '403':
          description: Forbidden
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorDetails'
        '429':
          description: Too Many Requests
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorDetails'
        '500':
          description: Internal Server Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorDetails'
      tags:
        - Deposit Attribution
      x-security:
        Deposit Attribution: present
        Read Deposit Attribution: present
  '/deposit-attributions/{depositTransactionId}':
    patch:
      operationId: performDepositAttribution
      summary: Attribute a deposit
      description: |+
        Permissions required: **Deposit Attribution**.


        Attribute a deposit by providing information about the originator.


        Only attributions in `PENDING` status can be attributed.


        Once the attribution is successfully performed the attribution status moves from `PENDING` to `UNDER_REVIEW`.


        For attributions performed via API the attributionType will always be `CLIENT_API`.

      parameters:
        - name: depositTransactionId
          in: path
          description: The transactionId where the transactionType is `DEPOSIT`.
          required: true
          schema:
            type: string
            pattern: '^[0-9A-Fa-f]+$'
        - name: Api-Signature
          in: header
          description: |
            A hex-encoded Ed25519 signature of `timestamp_epoch_seconds + uppercase(http_method) + request_path + request_body`.



            Construction example:

              ```
              toHex(
                ed25519Sign(
                  signing_key,
                  '{}{}{}{}'.format(timestamp_epoch_seconds, toUpper(httpMethod), httpRequestPath, httpBody)
                )
              )
              ```
          required: true
          schema:
            type: string
            pattern: '^[0-9A-Fa-f]{128,160}$'
        - name: Api-Timestamp
          in: header
          description: 'Current timestamp, represented as unix epoch seconds'
          required: true
          schema:
            type: integer
            format: int64
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/PerformDepositAttributionRequest'
      responses:
        '200':
          description: Deposit attributed successfully
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/PerformDepositAttributionResponse'
        '400':
          description: BadRequest
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorDetails'
        '401':
          description: Unauthenticated
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorDetails'
        '403':
          description: Forbidden
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorDetails'
        '404':
          description: Not Found
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorDetails'
        '409':
          description: Conflict
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorDetails'
        '429':
          description: Too Many Requests
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorDetails'
        '500':
          description: Internal Server Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorDetails'
      tags:
        - Deposit Attribution
      x-security:
        Deposit Attribution: present
  '/deposit-attributions/{depositTransactionId}/spam':
    post:
      operationId: performSpamAttribution
      summary: Attribute a deposit as spam
      description: |
        Permissions required: **Deposit Attribution**.


        Attribute a deposit as spam.


        Only attributions in `PENDING` status can be attributed.


        Once the attribution is successfully performed the attribution status moves from `PENDING` to `ATTRIBUTED`.


        For any spam attribution performed via API, the attributionType will automatically be set to `SPAM` and the deposit's funds will cease to be available.
      parameters:
        - name: depositTransactionId
          in: path
          description: The transactionId where the transactionType is `DEPOSIT`.
          required: true
          schema:
            type: string
            pattern: '^[0-9A-Fa-f]+$'
        - name: Api-Signature
          in: header
          description: |
            A hex-encoded Ed25519 signature of `timestamp_epoch_seconds + uppercase(http_method) + request_path + request_body`.



            Construction example:

              ```
              toHex(
                ed25519Sign(
                  signing_key,
                  '{}{}{}{}'.format(timestamp_epoch_seconds, toUpper(httpMethod), httpRequestPath, httpBody)
                )
              )
              ```
          required: true
          schema:
            type: string
            pattern: '^[0-9A-Fa-f]{128,160}$'
        - name: Api-Timestamp
          in: header
          description: 'Current timestamp, represented as unix epoch seconds'
          required: true
          schema:
            type: integer
            format: int64
      requestBody:
        required: false
        content:
          application/json:
            schema:
              type: object
              nullable: true
      responses:
        '200':
          description: Successfully attributed a deposit as spam
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/PerformDepositAttributionResponse'
        '400':
          description: BadRequest
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorDetails'
        '401':
          description: Unauthenticated
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorDetails'
        '403':
          description: Forbidden
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorDetails'
        '404':
          description: Not Found
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorDetails'
        '409':
          description: Conflict
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorDetails'
        '429':
          description: Too Many Requests
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorDetails'
        '500':
          description: Internal Server Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorDetails'
      tags:
        - Deposit Attribution
      x-security:
        Deposit Attribution: present
  /onboarding/customers:
    post:
      operationId: createKYCApplication
      summary: Begin new customer onboarding application
      description: |
        Permissions required: **Onboarding**
        Initiate onboarding application for a new customer of Anchorage Digital
      parameters: []
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/CreateKYCApplicationRequest'
      responses:
        '201':
          description: Customer ID and information of the successfully created customer onboarding application
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/CreateKYCApplicationResponse'
        '400':
          description: Bad Request
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorDetails'
        '401':
          description: Unauthenticated
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorDetails'
        '403':
          description: Forbidden
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorDetails'
        '404':
          description: Not Found
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorDetails'
        '429':
          description: Too Many Requests
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorDetails'
        '500':
          description: Internal Server Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorDetails'
        '501':
          description: Not Implemented
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorDetails'
        '503':
          description: Service Unavailable
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorDetails'
      tags:
        - Onboarding
      x-security:
        Onboarding: present
    get:
      operationId: getKYCAffiliates
      summary: Retrieve uploaded data and status of all customers onboarding
      description: |
        Permissions required: **Onboarding**

        List all customers onboarding application status, missing information and previously uploaded information.
      parameters:
        - name: afterId
          in: query
          description: When paginating this is used to provide the starting point for the page to fetch (retrieved from the previous response body)
          schema:
            type: string
        - name: limit
          in: query
          description: Maximum number of results to return per query
          schema:
            type: integer
            format: int64
            default: 25
            maximum: 100
            minimum: 1
      responses:
        '200':
          description: Customers onboarding application status and errors
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/GetKYCAffiliatesResponse'
        '400':
          description: Bad Request
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorDetails'
        '401':
          description: Unauthenticated
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorDetails'
        '403':
          description: Forbidden
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorDetails'
        '404':
          description: Not Found
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorDetails'
        '429':
          description: Too Many Requests
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorDetails'
        '500':
          description: Internal Server Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorDetails'
        '501':
          description: Not Implemented
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorDetails'
        '503':
          description: Service Unavailable
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorDetails'
      tags:
        - Onboarding
      x-security:
        Onboarding: present
  '/onboarding/customers/{customerId}':
    get:
      operationId: getKYCApplication
      summary: Retrieve uploaded data and status of customer onboarding
      description: |
        Permissions required: **Onboarding**

        Get customer onboarding application status, missing information and previously uploaded information.
      parameters:
        - name: customerId
          in: path
          description: Customer Id
          required: true
          schema:
            type: string
      responses:
        '200':
          description: Customer onboarding application status and errors
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/GetKYCApplicationResponse'
        '400':
          description: Bad Request
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorDetails'
        '401':
          description: Unauthenticated
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorDetails'
        '403':
          description: Forbidden
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorDetails'
        '404':
          description: Not Found
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorDetails'
        '429':
          description: Too Many Requests
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorDetails'
        '500':
          description: Internal Server Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorDetails'
        '501':
          description: Not Implemented
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorDetails'
        '503':
          description: Service Unavailable
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorDetails'
      tags:
        - Onboarding
      x-security:
        Onboarding: present
    put:
      operationId: updateKYCApplication
      summary: Update customer onboarding application
      description: |-
        Permissions required: **Onboarding**
        Update an existing customer onboarding application. The application data will be updated to match the entries of the update payload. If any field is invalid, the entire update will fail and no data will be updated.
      parameters:
        - name: customerId
          in: path
          description: Unique identifier customer - generated to the client when creating KYC application
          required: true
          schema:
            type: string
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/UpdateKYCApplicationRequest'
      responses:
        '200':
          description: Information regarding the onboarding state
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/UpdateKYCApplicationResponse'
        '400':
          description: Bad Request
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorDetails'
        '401':
          description: Unauthenticated
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorDetails'
        '403':
          description: Forbidden
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorDetails'
        '404':
          description: Not Found
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorDetails'
        '429':
          description: Too Many Requests
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorDetails'
        '500':
          description: Internal Server Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorDetails'
        '501':
          description: Not Implemented
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorDetails'
        '503':
          description: Service Unavailable
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorDetails'
      tags:
        - Onboarding
      x-security:
        Onboarding: present
  '/onboarding/customers/{customerId}/document':
    post:
      operationId: createKYCDocument
      summary: Request a signed URL for document image upload
      description: |
        Permissions required: **Onboarding**

        Request a signed URL for uploading document images for the existing customer onboarding application


        Note that the URL expires after 15m, you can still generate a new URL if this one expires. If the image file is never uploaded, the document will show as missing in the `GET` response and a new signed URL must be requested.
      parameters:
        - name: customerId
          in: path
          description: The unique identifier for the customer
          required: true
          schema:
            type: string
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/CreateKYCDocumentRequest'
      responses:
        '200':
          description: Information regarding the document url
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/CreateKYCDocumentResponse'
        '400':
          description: Bad Request
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorDetails'
        '401':
          description: Unauthenticated
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorDetails'
        '403':
          description: Forbidden
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorDetails'
        '404':
          description: Not Found
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorDetails'
        '429':
          description: Too Many Requests
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorDetails'
        '500':
          description: Internal Server Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorDetails'
        '501':
          description: Not Implemented
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorDetails'
        '503':
          description: Service Unavailable
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorDetails'
      tags:
        - Onboarding
      x-security:
        Onboarding: present
  '/onboarding/customers/{customerId}/submit':
    post:
      operationId: submitKYCApplication
      summary: Submit a completed customer onboarding application
      description: |
        Permissions required: **Onboarding**

        Indicate that a customer onboarding application is complete and can be submitted for screening
      parameters:
        - name: customerId
          in: path
          description: The unique identifier for the customer
          required: true
          schema:
            type: string
      responses:
        '200':
          description: Successfully submitted KYC application
        '400':
          description: Bad Request
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorDetails'
        '401':
          description: Unauthenticated
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorDetails'
        '403':
          description: Forbidden
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorDetails'
        '404':
          description: Not Found
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorDetails'
        '422':
          description: KYC application is missing required info
          content:
            application/json:
              examples:
                response:
                  value:
                    errorType: UnprocessableEntity
                    message: Affiliate missing some required documents or data
              schema:
                $ref: '#/components/schemas/ErrorDetails'
        '429':
          description: Too Many Requests
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorDetails'
        '500':
          description: Internal Server Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorDetails'
        '501':
          description: Not Implemented
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorDetails'
        '503':
          description: Service Unavailable
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorDetails'
      tags:
        - Onboarding
      x-security:
        Onboarding: present
  '/onboarding/agreements/{agreementType}':
    post:
      operationId: createKYCAgreement
      summary: Creates a new agreement questionnaire of the given agreementType
      description: |
        Permissions required: **Onboarding**
        Creates a new agreement questionnaire
      parameters:
        - name: agreementType
          in: path
          description: The type of the agreement
          required: true
          schema:
            type: string
            enum:
              - terms
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/CreateKYCAgreementRequest'
      responses:
        '201':
          description: Successfully creates a new agreement questionnaire
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/CreateKYCAgreementResponse'
        '400':
          description: Bad Request
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorDetails'
        '401':
          description: Unauthenticated
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorDetails'
        '403':
          description: Forbidden
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorDetails'
        '404':
          description: Not Found
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorDetails'
        '429':
          description: Too Many Requests
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorDetails'
        '500':
          description: Internal Server Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorDetails'
        '501':
          description: Not Implemented
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorDetails'
        '503':
          description: Service Unavailable
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorDetails'
      tags:
        - Onboarding
      x-security:
        Onboarding: present
    get:
      operationId: getKYCAgreements
      summary: Retrieves all the agreements questionnaires for the specified agreement type
      description: |
        Permissions required: **Onboarding**

        Retrieves all the agreements questionnaires for the specified agreement type
      parameters:
        - name: agreementType
          in: path
          description: The unique identifier for the agreement type
          required: true
          schema:
            type: string
            enum:
              - terms
        - name: status
          in: query
          description: Filter by status
          schema:
            type: string
            enum:
              - UNSPECIFIED
              - IN_PROGRESS
              - COMPLETE
              - DECLINED
              - VOIDED
        - name: afterId
          in: query
          description: When paginating this is used to provide the starting point for the page to fetch (retrieved from the previous response body)
          schema:
            type: string
        - name: limit
          in: query
          description: Maximum number of results to return per query
          schema:
            type: integer
            format: int64
            default: 25
            maximum: 100
            minimum: 1
      responses:
        '200':
          description: Success on fetching KYC agreements
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/GetKYCAgreementsResponse'
        '400':
          description: Bad Request
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorDetails'
        '401':
          description: Unauthenticated
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorDetails'
        '403':
          description: Forbidden
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorDetails'
        '404':
          description: Not Found
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorDetails'
        '429':
          description: Too Many Requests
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorDetails'
        '500':
          description: Internal Server Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorDetails'
        '501':
          description: Not Implemented
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorDetails'
        '503':
          description: Service Unavailable
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorDetails'
      tags:
        - Onboarding
      x-security:
        Onboarding: present
  '/onboarding/agreements/{agreementType}/{agreementId}':
    get:
      operationId: getKYCAgreement
      summary: Retrieves the agreement questionnaire of the given agreement type and agreement ID
      description: |
        Permissions required: **Onboarding**

        Retrieves the agreement questionnaire for the specified agreement type and agreement ID
      parameters:
        - name: agreementType
          in: path
          description: The unique identifier for the agreement type
          required: true
          schema:
            type: string
            enum:
              - terms
        - name: agreementId
          in: path
          description: The unique identifier for the agreement ID
          required: true
          schema:
            type: string
      responses:
        '200':
          description: Success on fetching KYC agreement
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/GetKYCAgreementResponse'
        '400':
          description: Bad Request
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorDetails'
        '401':
          description: Unauthenticated
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorDetails'
        '403':
          description: Forbidden
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorDetails'
        '404':
          description: Not Found
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorDetails'
        '429':
          description: Too Many Requests
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorDetails'
        '500':
          description: Internal Server Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorDetails'
        '501':
          description: Not Implemented
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorDetails'
        '503':
          description: Service Unavailable
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorDetails'
      tags:
        - Onboarding
      x-security:
        Onboarding: present
  /onboarding/subaccounts:
    post:
      operationId: createKYCSubaccountApplication
      summary: Begin new customer subaccount onboarding application
      description: |
        Permissions required: **Onboarding**

        Initiate onboarding application for a new customer subaccount of Anchorage Digital
      parameters: []
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/CreateKYCSubaccountApplicationRequest'
      responses:
        '201':
          description: Customer subaccount ID and information of the successfully created customer subaccount onboarding application
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/CreateKYCSubaccountApplicationResponse'
        '400':
          description: Bad Request
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorDetails'
        '401':
          description: Unauthenticated
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorDetails'
        '403':
          description: Forbidden
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorDetails'
        '404':
          description: Not Found
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorDetails'
        '429':
          description: Too Many Requests
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorDetails'
        '500':
          description: Internal Server Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorDetails'
        '501':
          description: Not Implemented
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorDetails'
        '503':
          description: Service Unavailable
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorDetails'
      tags:
        - Onboarding
      x-security:
        Onboarding: present
    get:
      operationId: getKYCSubaccountApplications
      summary: Retrieve uploaded data and status of all onboarding customer subaccounts
      description: |
        Permissions required: **Onboarding**

        List all customer subaccounts onboarding application status, missing information and previously uploaded information.
      parameters:
        - name: afterId
          in: query
          description: When paginating this is used to provide the starting point for the page to fetch (retrieved from the previous response body)
          schema:
            type: string
        - name: limit
          in: query
          description: Maximum number of results to return per query
          schema:
            type: integer
            format: int64
            default: 25
            maximum: 100
            minimum: 1
      responses:
        '200':
          description: Customer applications status and errors
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/GetKYCSubaccountApplicationsResponse'
        '400':
          description: Bad Request
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorDetails'
        '401':
          description: Unauthenticated
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorDetails'
        '403':
          description: Forbidden
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorDetails'
        '404':
          description: Not Found
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorDetails'
        '429':
          description: Too Many Requests
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorDetails'
        '500':
          description: Internal Server Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorDetails'
        '501':
          description: Not Implemented
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorDetails'
        '503':
          description: Service Unavailable
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorDetails'
      tags:
        - Onboarding
      x-security:
        Onboarding: present
  '/onboarding/subaccounts/{subaccountId}':
    get:
      operationId: getKYCSubaccountApplication
      summary: Retrieve uploaded data and status of customer subaccount onboarding
      description: |-
        Permissions required: **Onboarding**

        Get customer subaccount onboarding application status, missing information and previously uploaded information.
      parameters:
        - name: subaccountId
          in: path
          description: Unique identifier for a customer subaccount - generated to the client when creating subaccount
          required: true
          schema:
            type: string
      responses:
        '200':
          description: Customer subaccount onboarding application status and errors
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/GetKYCSubaccountApplicationResponse'
        '400':
          description: Bad Request
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorDetails'
        '401':
          description: Unauthenticated
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorDetails'
        '403':
          description: Forbidden
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorDetails'
        '404':
          description: Not Found
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorDetails'
        '429':
          description: Too Many Requests
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorDetails'
        '500':
          description: Internal Server Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorDetails'
        '501':
          description: Not Implemented
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorDetails'
        '503':
          description: Service Unavailable
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorDetails'
      tags:
        - Onboarding
      x-security:
        Onboarding: present
    put:
      operationId: updateKYCSubaccountApplication
      summary: Update customer subaccount onboarding application
      description: |-
        Permissions required: **Onboarding**
        Update data of an existing customer subaccount onboarding application
      parameters:
        - name: subaccountId
          in: path
          description: Unique identifier for a customer subaccount - generated to the client when creating subaccount
          required: true
          schema:
            type: string
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/UpdateKYCSubaccountApplicationRequest'
      responses:
        '200':
          description: Information regarding the onboarding state
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/UpdateKYCSubaccountApplicationResponse'
        '400':
          description: Bad Request
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorDetails'
        '401':
          description: Unauthenticated
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorDetails'
        '403':
          description: Forbidden
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorDetails'
        '404':
          description: Not Found
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorDetails'
        '429':
          description: Too Many Requests
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorDetails'
        '500':
          description: Internal Server Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorDetails'
        '501':
          description: Not Implemented
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorDetails'
        '503':
          description: Service Unavailable
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorDetails'
      tags:
        - Onboarding
      x-security:
        Onboarding: present
  '/onboarding/subaccounts/{subaccountId}/submit':
    post:
      operationId: submitKYCSubaccountApplication
      summary: Submit a completed customer subaccount onboarding application
      description: |-
        Permissions required: **Onboarding**

        Indicate that a customer subaccount onboarding application is complete and can be submitted for screening
      parameters:
        - name: subaccountId
          in: path
          description: Unique identifier for a customer subaccount - generated to the client when creating subaccount
          required: true
          schema:
            type: string
      responses:
        '200':
          description: Successfully submitted KYC application
        '400':
          description: Bad Request
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorDetails'
        '401':
          description: Unauthenticated
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorDetails'
        '403':
          description: Forbidden
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorDetails'
        '404':
          description: Not Found
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorDetails'
        '422':
          description: KYC application is missing required info
          content:
            application/json:
              examples:
                response:
                  value:
                    errorType: UnprocessableEntity
                    message: Affiliate missing some required documents or data
              schema:
                $ref: '#/components/schemas/ErrorDetails'
        '429':
          description: Too Many Requests
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorDetails'
        '500':
          description: Internal Server Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorDetails'
        '501':
          description: Not Implemented
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorDetails'
        '503':
          description: Service Unavailable
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorDetails'
      tags:
        - Onboarding
      x-security:
        Onboarding: present
  /stablecoins/conversion:
    post:
      operationId: convertStablecoins
      summary: Create a Stablecoin Conversion
      description: |-
        Permissions required: **Convert Stablecoins**


        Create a stablecoin conversion, either issuance or redemption. Issuance is when USD is converted to the stablecoin. Redemption is when the stablecoin asset is converted to USD.
      parameters: []
      requestBody:
        description: Stablecoin Conversion
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/StablecoinConversion'
      responses:
        '201':
          description: authorizationOperationId
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/StablecoinConversionResponse'
        '400':
          description: Bad Request
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorDetails'
        '401':
          description: Unauthenticated
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorDetails'
        '403':
          description: Forbidden
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorDetails'
        '429':
          description: Too Many Requests
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorDetails'
        '500':
          description: Internal Server Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorDetails'
      tags:
        - Stablecoins
  /stablecoins/history:
    get:
      operationId: getStablecoinHistory
      summary: Get Issue/Redeem History
      description: |-
        Permissions required: **Convert Stablecoins**


        Retrieve the history of stablecoin issuance and redemption operations for your organization.
        Results are paginated and ordered by creation time (newest first).
      parameters:
        - name: limit
          in: query
          description: 'Maximum number of results to return (default 100, max 100)'
          required: false
          schema:
            type: integer
            format: int32
            default: 100
            maximum: 100
            minimum: 1
        - name: lastCreatedAt
          in: query
          description: Cursor for pagination - timestamp of the last result from the previous page (RFC3339 format)
          required: false
          schema:
            type: string
            format: date-time
      responses:
        '200':
          description: Issue/redeem history
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/IssueRedeemHistoryResponse'
        '400':
          description: Bad Request
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorDetails'
        '401':
          description: Unauthenticated
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorDetails'
        '403':
          description: Forbidden
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorDetails'
        '429':
          description: Too Many Requests
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorDetails'
        '500':
          description: Internal Server Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorDetails'
      tags:
        - Stablecoins
  /stablecoins/reserves:
    get:
      operationId: getStablecoinReserves
      summary: Get Stablecoin Reserves History
      description: |-
        Permissions required: **Read vault activity**


        Retrieve the daily reserves reconciliation history for a stablecoin your organization is entitled to.
        Results are paginated and ordered by creation time (newest first).
      parameters:
        - name: stablecoin
          in: query
          description: Token symbol to query. Your organization must be entitled to read reserves for this token.
          required: true
          schema:
            type: string
        - name: startDate
          in: query
          description: 'Return rows with reportDate on or after this date (inclusive), in `YYYY-MM-DD` format. Dates are always in UTC.'
          required: false
          schema:
            type: string
            format: date
        - name: endDate
          in: query
          description: 'Return rows with reportDate on or before this date (inclusive), in `YYYY-MM-DD` format. Dates are always in UTC.'
          required: false
          schema:
            type: string
            format: date
        - name: limit
          in: query
          description: 'Maximum number of results to return (default 100, max 100)'
          required: false
          schema:
            type: integer
            format: int32
            default: 100
            maximum: 100
            minimum: 1
        - name: lastCreatedAt
          in: query
          description: Cursor for pagination - timestamp of the last result from the previous page (RFC3339 format)
          required: false
          schema:
            type: string
            format: date-time
      responses:
        '200':
          description: Reserves history
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ReservesHistoryResponse'
        '400':
          description: Bad Request
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorDetails'
        '401':
          description: Unauthenticated
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorDetails'
        '403':
          description: Forbidden
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorDetails'
        '429':
          description: Too Many Requests
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorDetails'
        '500':
          description: Internal Server Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorDetails'
      tags:
        - Stablecoins
  /stablecoins/reserves/entitled-stablecoins:
    get:
      operationId: getStablecoinReservesEntitledStablecoins
      summary: Get Stablecoin Reserves Entitled Stablecoins
      description: |-
        Permissions required: **Read vault activity**


        List the stablecoins whose reserves history your organization is entitled to view. Pass any returned symbol as the `stablecoin` query parameter to `GET /stablecoins/reserves` to retrieve that stablecoin's daily reserves reconciliation history. Returns an empty array when your organization cannot view reserves history for any stablecoin.
      parameters: []
      responses:
        '200':
          description: Entitled stablecoins
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/StablecoinReservesEntitledStablecoinsResponse'
        '400':
          description: Bad Request
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorDetails'
        '401':
          description: Unauthenticated
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorDetails'
        '403':
          description: Forbidden
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorDetails'
        '429':
          description: Too Many Requests
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorDetails'
        '500':
          description: Internal Server Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorDetails'
      tags:
        - Stablecoins
  /statement-types:
    get:
      operationId: listStatementTypes
      summary: List statement types
      description: |-
        Permissions required: **Read Statement**


        List the available statement types.
      parameters:
        - name: afterId
          in: query
          description: When paginating this is used to provide the starting point for the page to fetch (retrieved from the previous response body)
          schema:
            type: string
        - name: limit
          in: query
          description: Maximum number of results to return per query
          schema:
            type: integer
            format: int64
            default: 25
            maximum: 100
            minimum: 1
      responses:
        '200':
          description: Statement Type list
          content:
            application/json:
              schema:
                type: object
                properties:
                  data:
                    type: array
                    items:
                      $ref: '#/components/schemas/StatementType'
                  page:
                    $ref: '#/components/schemas/Page'
                required:
                  - data
                  - page
              example:
                data:
                  - id: b00e2483-57a1-4db4-8ea1-b91223a76a20
                    name: Brokerage Monthly Statement
                  - id: d3b07384-d9a0-4f8b-8a1a-6f3e4b2e4f8b
                    name: Custody Monthly Statement
                  - id: 058da362-31a7-4e2b-ae3e-77b095389a5f
                    name: Exchange Trade Fund
                  - id: e6ffd062-7bbc-4d72-b9d0-409f7fe7dd0d
                    name: Program Customer Monthly
                  - id: cbe88de1-2470-46f1-aa59-932eeda16ba2
                    name: Registered Investment Advisor
                page:
                  next: null
        '401':
          description: Unauthenticated
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorDetails'
        '403':
          description: Forbidden
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorDetails'
        '429':
          description: Too Many Requests
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorDetails'
        '500':
          description: Internal Server Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorDetails'
      tags:
        - Statements
  /statements:
    get:
      operationId: listStatements
      summary: List statements
      description: |-
        Permissions required: **Read Statement**


        List the available statements.
      parameters:
        - name: afterId
          in: query
          description: When paginating this is used to provide the starting point for the page to fetch (retrieved from the previous response body)
          schema:
            type: string
        - name: limit
          in: query
          description: Maximum number of results to return per query
          schema:
            type: integer
            format: int64
            default: 25
            maximum: 100
            minimum: 1
        - name: ids
          in: query
          schema:
            type: array
            items:
              type: string
              format: uuid
          example:
            - 3486b413-93d3-4447-afce-2b9c9dc34a32
            - 8de0fc33-7443-4dcf-bbf1-4ca8d0e0509f
        - name: typeIds
          in: query
          schema:
            type: array
            items:
              type: string
          example:
            - 058da362-31a7-4e2b-ae3e-77b095389a5f
            - b00e2483-57a1-4db4-8ea1-b91223a76a20
        - name: customerIds
          in: query
          schema:
            type: array
            items:
              type: string
          example:
            - 1ac10949bbbf483e8df3c0f8ef97146bc9ce6f5890df40fa8777ea63dc932f7b
            - fbcdb420fca4439d919089e60d59cd5b12b692d215694681b636bffb6cb1618c
        - name: createdAfter
          in: query
          schema:
            type: string
            format: date-time
            example: '2019-01-02T12:34:56.000Z'
          example: '2025-01-01T00:00:00.000Z'
        - name: createdBefore
          in: query
          schema:
            type: string
            format: date-time
            example: '2019-01-02T12:34:56.000Z'
          example: '2025-12-31T23:59:59.999Z'
        - name: correctedAfter
          in: query
          description: Filter for statements corrected at or after this time
          schema:
            type: string
            format: date-time
            example: '2019-01-02T12:34:56.000Z'
          example: '2025-01-01T00:00:00.000Z'
        - name: correctedBefore
          in: query
          description: Filter for statements corrected at or before this time
          schema:
            type: string
            format: date-time
            example: '2019-01-02T12:34:56.000Z'
          example: '2025-12-31T23:59:59.999Z'
      responses:
        '200':
          description: Statement list
          content:
            application/json:
              schema:
                type: object
                properties:
                  data:
                    type: array
                    items:
                      $ref: '#/components/schemas/Statement'
                  page:
                    $ref: '#/components/schemas/Page'
                required:
                  - data
                  - page
              example:
                data:
                  - customerId: fbcdb420fca4439d919089e60d59cd5b12b692d215694681b636bffb6cb1618c
                    createdAt: '2025-03-27T17:15:42.793685Z'
                    displayName: ETF Statement October 2025
                    id: 8de0fc33-7443-4dcf-bbf1-4ca8d0e0509f
                    typeId: 058da362-31a7-4e2b-ae3e-77b095389a5f
                  - customerId: fbcdb420fca4439d919089e60d59cd5b12b692d215694681b636bffb6cb1618c
                    createdAt: '2025-04-01T00:15:00.738904Z'
                    displayName: ETF Statement December 2025
                    id: db3021e7-b2c4-4b80-8d9c-b754f1b4ef5f
                    typeId: 058da362-31a7-4e2b-ae3e-77b095389a5f
                  - customerId: fbcdb420fca4439d919089e60d59cd5b12b692d215694681b636bffb6cb1618c
                    createdAt: '2025-09-01T00:47:16.937934Z'
                    displayName: ETF Statement September 2025
                    id: a7f61ad0-89fe-4e9d-9285-7219d7c51c6b
                    typeId: 058da362-31a7-4e2b-ae3e-77b095389a5f
                page:
                  next: null
        '401':
          description: Unauthenticated
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorDetails'
        '403':
          description: Forbidden
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorDetails'
        '429':
          description: Too Many Requests
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorDetails'
        '500':
          description: Internal Server Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorDetails'
      tags:
        - Statements
  '/statements/{statementId}':
    get:
      operationId: getStatement
      summary: Get statement
      description: |-
        Permissions required: **Read Statement**


        Get the details for a statement.
      parameters:
        - name: statementId
          in: path
          description: Unique identifier for the statement
          required: true
          schema:
            type: string
            format: uuid
          example: 3486b413-93d3-4447-afce-2b9c9dc34a32
      responses:
        '200':
          description: Statement Details
          content:
            application/json:
              schema:
                type: object
                properties:
                  data:
                    $ref: '#/components/schemas/StatementDetails'
                required:
                  - data
              example:
                data:
                  customerId: 3ed6ef079913cb5e786c03f73326511b0bbebc438f941cb13650d48650904fc6
                  createdAt: '2025-09-01T00:47:16.937934Z'
                  displayName: RIA Statement September 2025
                  id: 2cfb5ca8-8a71-11f0-969e-42010a1f04ea
                  typeId: 058da362-31a7-4e2b-ae3e-77b095389a5f
        '401':
          description: Unauthenticated
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorDetails'
        '403':
          description: Forbidden
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorDetails'
        '404':
          description: Not Found
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorDetails'
        '429':
          description: Too Many Requests
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorDetails'
        '500':
          description: Internal Server Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorDetails'
      tags:
        - Statements
  '/statements/{statementId}/download':
    get:
      operationId: downloadStatement
      summary: Download a statement
      description: |-
        Permissions required: **Read Statement**


        Download a statement as a PDF file.

        This endpoint streams the PDF file directly. The response body contains the binary content of the PDF file.
      parameters:
        - name: statementId
          in: path
          description: Unique identifier for the statement
          required: true
          schema:
            type: string
            format: uuid
          example: 3486b413-93d3-4447-afce-2b9c9dc34a32
      responses:
        '200':
          description: Statement PDF file streamed as binary content
          content:
            application/pdf:
              schema:
                type: string
                format: binary
        '401':
          description: Unauthenticated
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorDetails'
        '403':
          description: Forbidden
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorDetails'
        '404':
          description: Not Found
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorDetails'
        '429':
          description: Too Many Requests
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorDetails'
        '500':
          description: Internal Server Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorDetails'
      tags:
        - Statements
  '/subaccounts/accounts/{subaccountId}/wallets':
    get:
      operationId: getSubaccountWallets
      summary: Return wallets linked to a subaccount
      description: |
        Permissions required: **Subaccount** or **Read Subaccount**

        Return wallets linked to a subaccount
      parameters:
        - name: networkIds
          in: query
          schema:
            type: array
            items:
              type: string
          explode: false
          style: form
        - name: subaccountId
          in: path
          description: Unique Identifier for the subaccount
          required: true
          schema:
            type: string
      responses:
        '200':
          description: Successfully returned linked wallets
          content:
            application/json:
              schema:
                type: object
                properties:
                  data:
                    type: array
                    items:
                      $ref: '#/components/schemas/SubaccountWalletResponse'
                required:
                  - data
        '400':
          description: Bad Request
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorDetails'
        '401':
          description: Unauthenticated
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorDetails'
        '403':
          description: Forbidden
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorDetails'
        '404':
          description: Not Found
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorDetails'
        '429':
          description: Too Many Requests
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorDetails'
        '500':
          description: Internal Server Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorDetails'
      tags:
        - Subaccounts
      x-security:
        Subaccount: present
        Read Subaccount: present
  '/subaccounts/accounts/{subaccountId}/bank-info':
    get:
      operationId: subaccountBankInfo
      summary: Return bank information for a subaccount
      description: |
        Permissions required: **Subaccount** or **Read Subaccount**

        Return bank information for a subaccount
      parameters:
        - name: subaccountId
          in: path
          description: Unique Identifier for the subaccount
          required: true
          schema:
            type: string
      responses:
        '200':
          description: Successfully returned bank info
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/BankInfoResponse'
        '400':
          description: Bad Request
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorDetails'
        '401':
          description: Unauthenticated
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorDetails'
        '403':
          description: Forbidden
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorDetails'
        '404':
          description: NotFound
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorDetails'
        '429':
          description: Too Many Requests
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorDetails'
        '500':
          description: Internal Server Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorDetails'
      tags:
        - Subaccounts
      x-security:
        Subaccount: present
        Read Subaccount: present
  '/subaccounts/customers/{customerId}/accounts':
    post:
      operationId: createSubaccount
      summary: Create a new subaccount for a given program customer
      description: |-
        Permissions required: **Subaccount**

        Open a new subaccount for the program customer

        DEPRECATED, please use /onboarding/accounts
      parameters:
        - name: customerId
          in: path
          description: Unique Identifier for the program customer
          required: true
          schema:
            type: string
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/CreateSubaccountRequest'
      responses:
        '200':
          description: Successfully created the subaccount
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/CreateSubaccountResponse'
        '400':
          description: Bad Request
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorDetails'
        '401':
          description: Unauthenticated
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorDetails'
        '403':
          description: Forbidden
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorDetails'
        '429':
          description: Too Many Requests
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorDetails'
        '500':
          description: Internal Server Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorDetails'
      deprecated: true
      tags:
        - Subaccounts
      x-security:
        Subaccount: present
    get:
      operationId: getSubaccountsByCustomerId
      summary: List subaccounts
      description: |
        Permissions required: **Subaccount** or **Read Subaccount**

        Return all subaccounts associated to a customerId
      parameters:
        - name: customerId
          in: path
          description: Unique Identifier for the customer
          required: true
          schema:
            type: string
        - name: endDate
          in: query
          description: 'The end date (inclusive) in `YYYY-MM-DD` format. The latest valid end date is the current date. Dates are always in UTC [RFC 3339](https://datatracker.ietf.org/doc/html/rfc3339#section-5.6) ''full-date''.'
          schema:
            type: string
            format: date
        - name: afterId
          in: query
          description: When paginating this is used to provide the starting point for the page to fetch (retrieved from the previous response body)
          schema:
            type: string
        - name: statuses
          in: query
          description: Filter subaccounts by status
          schema:
            type: array
            items:
              type: string
          explode: false
          style: form
        - name: limit
          in: query
          description: Maximum number of results to return per query
          schema:
            type: integer
            format: int64
            default: 25
            maximum: 100
            minimum: 1
      responses:
        '200':
          description: Successfully returned subaccounts
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/SubaccountsResponse'
        '400':
          description: Bad Request
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorDetails'
        '401':
          description: Unauthenticated
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorDetails'
        '403':
          description: Forbidden
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorDetails'
        '429':
          description: Too Many Requests
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorDetails'
        '500':
          description: Internal Server Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorDetails'
      tags:
        - Subaccounts
      x-security:
        Subaccount: present
        Read Subaccount: present
  /subaccounts/customers/accounts:
    get:
      operationId: getAllSubaccounts
      summary: List all subaccounts
      description: |
        Permissions required: **Subaccount** or **Read Subaccount**

        Return all subaccounts associated for an organization
      parameters:
        - name: subaccountIds
          in: query
          description: Array of Unique Identifiers for the subaccount
          required: false
          schema:
            type: array
            items:
              type: string
          explode: false
          style: form
        - name: externalIds
          in: query
          description: Array of Unique Identifiers within an external system
          required: false
          schema:
            type: array
            items:
              type: string
          explode: false
          style: form
        - name: endDate
          in: query
          description: 'The end date (inclusive) in `YYYY-MM-DD` format. The latest valid end date is the current date. Dates are always in UTC [RFC 3339](https://datatracker.ietf.org/doc/html/rfc3339#section-5.6) ''full-date''.'
          schema:
            type: string
            format: date
        - name: afterId
          in: query
          description: When paginating this is used to provide the starting point for the page to fetch (retrieved from the previous response body)
          schema:
            type: string
        - name: statuses
          in: query
          description: Filter subaccounts by status
          schema:
            type: array
            items:
              type: string
          explode: false
          style: form
        - name: limit
          in: query
          description: Maximum number of results to return per query
          schema:
            type: integer
            format: int64
            default: 25
            maximum: 100
            minimum: 1
      responses:
        '200':
          description: Successfully returned subaccounts
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/SubaccountsResponse'
        '400':
          description: Bad Request
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorDetails'
        '401':
          description: Unauthenticated
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorDetails'
        '403':
          description: Forbidden
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorDetails'
        '429':
          description: Too Many Requests
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorDetails'
        '500':
          description: Internal Server Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorDetails'
      tags:
        - Subaccounts
      x-security:
        Subaccount: present
        Read Subaccount: present
  '/subaccounts/accounts/{subaccountId}':
    patch:
      operationId: updateSubaccount
      summary: Update an existing subaccount
      description: |
        Permissions required: **Subaccount**

        Update a subaccount
      parameters:
        - name: subaccountId
          in: path
          description: Unique Identifier for the subaccount
          required: true
          schema:
            type: string
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/UpdateSubaccountRequest'
      responses:
        '200':
          description: Successfully updated the subaccount
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/UpdateSubaccountResponse'
        '400':
          description: Bad Request
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorDetails'
        '401':
          description: Unauthenticated
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorDetails'
        '403':
          description: Forbidden
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorDetails'
        '429':
          description: Too Many Requests
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorDetails'
        '500':
          description: Internal Server Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorDetails'
      tags:
        - Subaccounts
      x-security:
        Subaccount: present
  /subaccounts/transactions:
    post:
      operationId: createSubaccountTransaction
      summary: Create new transactions
      description: |
        Permissions required: **Subaccount**


        Create new transactions between subaccounts of the same Program Customer. This is a transactional operation, all transactions will be created successfully or none will.
      parameters:
        - name: Api-Signature
          in: header
          description: |
            A hex-encoded Ed25519 signature of `timestamp_epoch_seconds + uppercase(http_method) + request_path + request_body`.



            Construction example:

              ```
              toHex(
                ed25519Sign(
                  signing_key,
                  '{}{}{}{}'.format(timestamp_epoch_seconds, toUpper(httpMethod), httpRequestPath, httpBody)
                )
              )
              ```
          required: true
          schema:
            type: string
            pattern: '^[0-9A-Fa-f]{128,160}$'
        - name: Api-Timestamp
          in: header
          description: 'Current timestamp, represented as unix epoch seconds'
          required: true
          schema:
            type: integer
            format: int64
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/CreateSubaccountTransactionRequest'
      responses:
        '200':
          description: Successfully created the transactions
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/CreateSubaccountTransactionResponse'
        '400':
          description: Bad Request
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorDetails'
        '401':
          description: Unauthenticated
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorDetails'
        '403':
          description: Forbidden
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorDetails'
        '429':
          description: Too Many Requests
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorDetails'
        '500':
          description: Internal Server Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorDetails'
      tags:
        - Subaccounts
      x-security:
        Subaccount: present
    get:
      operationId: getSubaccountTransactions
      summary: List all transactions
      description: |
        Permissions required: **Subaccount** or **Read Subaccount**


        Return all the transactions, sorted by the creation date, the client has access to
      parameters:
        - name: subaccountId
          in: query
          description: Unique Identifier for the Subaccount
          required: false
          schema:
            type: string
        - name: afterId
          in: query
          description: When paginating this is used to provide the starting point for the page to fetch (retrieved from the previous response body)
          schema:
            type: string
        - name: limit
          in: query
          description: Maximum number of results to return per query
          schema:
            type: integer
            format: int64
            default: 25
            maximum: 100
            minimum: 1
        - name: statuses
          in: query
          description: One or more transaction statuses to filter results
          schema:
            type: array
            items:
              type: string
              enum:
                - POSTED
                - PENDING
                - CANCELED
            uniqueItems: true
          explode: false
          style: form
        - name: types
          in: query
          description: One or more transaction types to filter results
          schema:
            type: array
            items:
              type: string
              enum:
                - DEPOSIT
                - WITHDRAWAL
                - TRADE
                - TRADE_SETTLEMENT
                - MANAGEMENT_FEE
                - CUSTODY_FEE
                - ADVISORY_FEE
                - MODEL_FEE
                - FEE_SETTLEMENT
                - SUBACCOUNT_TRANSFER
                - STAKING_REWARD
                - DELEGATION_REWARD
            uniqueItems: true
          explode: false
          style: form
        - name: startDate
          in: query
          description: 'The start date (inclusive) in `YYYY-MM-DD` format. The earliest valid start date is ''2017-01-01`. Dates are always in UTC [RFC 3339](https://datatracker.ietf.org/doc/html/rfc3339#section-5.6) ''full-date''.'
          required: false
          schema:
            type: string
            format: date
        - name: endDate
          in: query
          description: 'The end date (inclusive) in `YYYY-MM-DD` format. The earliest valid start date is ''2017-01-01`. Dates are always in UTC [RFC 3339](https://datatracker.ietf.org/doc/html/rfc3339#section-5.6) ''full-date''.'
          required: false
          schema:
            type: string
            format: date
      responses:
        '200':
          description: A list of transactions
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/SubaccountTransactionsResponse'
        '400':
          description: Bad Request
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorDetails'
        '401':
          description: Unauthenticated
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorDetails'
        '403':
          description: Forbidden
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorDetails'
        '429':
          description: Too Many Requests
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorDetails'
        '500':
          description: Internal Server Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorDetails'
      tags:
        - Subaccounts
      x-security:
        Subaccount: present
        Read Subaccount: present
  '/subaccounts/transactions/{transactionsIds}':
    get:
      operationId: getSubaccountTransactionsById
      summary: Get list of transactions filter by ID
      description: |
        Permissions required: **Subaccount** or **Read Subaccount**


        Return the requested transactions, sorted by the creation date, the client has access too
      parameters:
        - name: transactionsIds
          in: path
          description: Unique Identifiers for the transaction. Invalid transactionIds will be ignored.
          required: true
          schema:
            type: array
            items:
              type: string
          style: simple
        - name: startDate
          in: query
          description: 'The start date (inclusive) in `YYYY-MM-DD` format. The earliest valid start date is ''2017-01-01`. Dates are always in UTC [RFC 3339](https://datatracker.ietf.org/doc/html/rfc3339#section-5.6) ''full-date''.'
          required: false
          schema:
            type: string
            format: date
        - name: endDate
          in: query
          description: 'The end date (inclusive) in `YYYY-MM-DD` format. The latest valid end date is the current date. Dates are always in UTC [RFC 3339](https://datatracker.ietf.org/doc/html/rfc3339#section-5.6) ''full-date''.'
          schema:
            type: string
            format: date
        - name: afterId
          in: query
          description: When paginating this is used to provide the starting point for the page to fetch (retrieved from the previous response body)
          schema:
            type: string
        - name: limit
          in: query
          description: Maximum number of results to return per query
          schema:
            type: integer
            format: int64
            default: 25
            maximum: 100
            minimum: 1
      responses:
        '200':
          description: A list of requested transactions
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/SubaccountTransactionsByIdResponse'
        '400':
          description: Bad Request
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorDetails'
        '401':
          description: Unauthenticated
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorDetails'
        '403':
          description: Forbidden
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorDetails'
        '429':
          description: Too Many Requests
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorDetails'
        '500':
          description: Internal Server Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorDetails'
      tags:
        - Subaccounts
      x-security:
        Subaccount: present
        Read Subaccount: present
  /subaccounts/transactions/allocations:
    post:
      operationId: createFundingAllocations
      summary: Create new allocations
      description: |
        Permissions required: **Subaccount**


        Create new allocation of pre-funded values between the Funding and Program Customers' subaccounts. This is a transactional operation, all transactions will be created successfully or none will.
      parameters:
        - name: Api-Signature
          in: header
          description: |
            A hex-encoded Ed25519 signature of `timestamp_epoch_seconds + uppercase(http_method) + request_path + request_body`.



            Construction example:

              ```
              toHex(
                ed25519Sign(
                  signing_key,
                  '{}{}{}{}'.format(timestamp_epoch_seconds, toUpper(httpMethod), httpRequestPath, httpBody)
                )
              )
              ```
          required: true
          schema:
            type: string
            pattern: '^[0-9A-Fa-f]{128,160}$'
        - name: Api-Timestamp
          in: header
          description: 'Current timestamp, represented as unix epoch seconds'
          required: true
          schema:
            type: integer
            format: int64
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/CreateFundingAllocationsRequest'
      responses:
        '200':
          description: Successfully created the transactions
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/CreateFundingAllocationsResponse'
        '400':
          description: Bad Request
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorDetails'
        '401':
          description: Unauthenticated
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorDetails'
        '403':
          description: Forbidden
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorDetails'
        '429':
          description: Too Many Requests
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorDetails'
        '500':
          description: Internal Server Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorDetails'
      tags:
        - Subaccounts
      x-security:
        Subaccount: present
    get:
      operationId: getFundingAllocations
      summary: Fetches a set of filtered transactions allocations
      description: |
        Permissions required: **Subaccount** or **Read Subaccount**


        Retrieves a filtered set of transactions that are connected to funding allocations.
      parameters:
        - name: subaccountIds
          in: query
          description: Array of Unique Identifiers for the subaccount
          required: false
          schema:
            type: array
            items:
              type: string
          explode: false
          style: form
        - name: startDate
          in: query
          description: 'The start date (inclusive) in `YYYY-MM-DD` format. The earliest valid start date is ''2017-01-01`. Dates are always in UTC [RFC 3339](https://datatracker.ietf.org/doc/html/rfc3339#section-5.6) ''full-date''.'
          required: false
          schema:
            type: string
            format: date
        - name: endDate
          in: query
          description: 'The end date (inclusive) in `YYYY-MM-DD` format. The latest valid end date is the current date. Dates are always in UTC [RFC 3339](https://datatracker.ietf.org/doc/html/rfc3339#section-5.6) ''full-date''.'
          required: false
          schema:
            type: string
            format: date
        - name: transactionsTypes
          in: query
          description: 'Filters by DEPOSITs, WITHDRAWALs or both (default)'
          schema:
            type: array
            items:
              type: string
              enum:
                - DEPOSIT
                - WITHDRAWAL
            uniqueItems: true
          explode: false
          style: form
        - name: afterId
          in: query
          description: When paginating this is used to provide the starting point for the page to fetch (retrieved from the previous response body)
          schema:
            type: string
        - name: limit
          in: query
          description: Maximum number of results to return per query
          schema:
            type: integer
            format: int64
            default: 25
            maximum: 100
            minimum: 1
      responses:
        '200':
          description: A list of transactions
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/SubaccountTransactionsResponse'
        '400':
          description: Bad Request
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorDetails'
        '401':
          description: Unauthenticated
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorDetails'
        '403':
          description: Forbidden
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorDetails'
        '429':
          description: Too Many Requests
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorDetails'
        '500':
          description: Internal Server Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorDetails'
      tags:
        - Subaccounts
      x-security:
        Subaccount: present
        Read Subaccount: present
  '/subaccounts/{subaccountId}/fiat/withdrawals':
    post:
      operationId: createSubaccountWithdrawal
      summary: Create a USD Withdrawal Request for a subaccount
      description: |-
        Permissions required: **Subaccount**


        Creates a USD Withdrawal Request for an Asset within a Subaccount (FIAT only for now)

        This will trigger an e-mail to be sent to the program customer to authorize the withdrawal.
      parameters:
        - name: subaccountId
          in: path
          description: Unique Identifier for the subaccount
          required: true
          schema:
            type: string
        - name: Api-Signature
          in: header
          description: "A hex-encoded Ed25519 signature of `timestamp_epoch_seconds + uppercase(http_method) + request_path + request_body`.\n\n\n\nConstruction example:\n\n```\n\ntoHex(\n\n\ted25519Sign( \tsigning_key, \t'{}{}{}{}'.format(timestamp_epoch_seconds, toUpper(httpMethod), httpRequestPath, httpBody) \t) )\n\n```\n"
          required: true
          schema:
            type: string
            pattern: '^[0-9A-Fa-f]{128,160}$'
        - name: Api-Timestamp
          in: header
          description: 'Current timestamp, represented as unix epoch seconds'
          required: true
          schema:
            type: integer
            format: int64
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/CreateSubaccountWithdrawalRequest'
      responses:
        '200':
          description: The ID of the created Transaction
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/CreateSubaccountWithdrawalResponse'
        '400':
          description: Bad Request
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorDetails'
        '401':
          description: Unauthenticated
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorDetails'
        '403':
          description: Forbidden
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorDetails'
        '429':
          description: Too Many Requests
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorDetails'
        '500':
          description: Internal Server Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorDetails'
      tags:
        - Subaccounts
      x-security:
        Subaccount: present
    get:
      operationId: listSubaccountWithdrawals
      summary: Fetches a set of Withdrawals Requests for a subaccount
      description: |-
        Permissions required: **Subaccount** or **Read Subaccount**


        Retrieves a filtered set of Withdrawal Requests within a Subaccount (FIAT only for now).
      parameters:
        - name: subaccountId
          in: path
          description: Unique Identifier for the subaccount
          required: true
          schema:
            type: string
        - name: withdrawalStatuses
          in: query
          description: 'One or more withdrawal statuses to filter results. If no value is passed, it filter by all statuses.'
          required: false
          schema:
            type: array
            items:
              type: string
              enum:
                - INITIATED
                - FAILED
                - PENDING_ENDORSEMENT
                - PENDING_REVIEW
                - BROADCASTING
                - COMPLETED
                - CANCELED
            uniqueItems: true
          explode: false
          style: form
        - name: startDate
          in: query
          description: 'The start date (inclusive) in `YYYY-MM-DD` format. The earliest valid start date is ''2017-01-01`. Dates are always in UTC [RFC 3339](https://datatracker.ietf.org/doc/html/rfc3339#section-5.6) ''full-date''.'
          required: false
          schema:
            type: string
            format: date
        - name: endDate
          in: query
          description: 'The end date (inclusive) in `YYYY-MM-DD` format. The latest valid end date is the current date. Dates are always in UTC [RFC 3339](https://datatracker.ietf.org/doc/html/rfc3339#section-5.6) ''full-date''.'
          required: false
          schema:
            type: string
            format: date
        - name: afterId
          in: query
          description: When paginating this is used to provide the starting point for the page to fetch (retrieved from the previous response body)
          required: false
          schema:
            type: string
        - name: limit
          in: query
          description: Maximum number of results to return per query
          required: false
          schema:
            type: integer
            format: int64
            default: 25
            maximum: 100
            minimum: 1
      responses:
        '200':
          description: List the Withdrawal Requests
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ListSubaccountWithdrawalsResponse'
        '400':
          description: Bad Request
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorDetails'
        '401':
          description: Unauthenticated
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorDetails'
        '403':
          description: Forbidden
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorDetails'
        '404':
          description: Not Found
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorDetails'
        '429':
          description: Too Many Requests
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorDetails'
        '500':
          description: Internal Server Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorDetails'
      tags:
        - Subaccounts
      x-security:
        Subaccount: present
        Read Subaccount: present
  '/subaccounts/{subaccountId}/fiat/withdrawals/{transactionId}':
    delete:
      operationId: cancelSubaccountWithdrawal
      summary: Cancels a Withdrawal Request for a subaccount
      description: |
        Permissions required: **Subaccount**
        Cancels a Withdrawal Request
      parameters:
        - name: subaccountId
          in: path
          description: Unique Identifier for the subaccount
          required: true
          schema:
            type: string
        - name: transactionId
          in: path
          description: Unique Identifier for the Withdrawal Transaction
          required: true
          schema:
            type: string
        - name: Api-Signature
          in: header
          description: |
            A hex-encoded Ed25519 signature of `timestamp_epoch_seconds + uppercase(http_method) + request_path + request_body`.



            Construction example:

              ```
              toHex(
                ed25519Sign(
                  signing_key,
                  '{}{}{}{}'.format(timestamp_epoch_seconds, toUpper(httpMethod), httpRequestPath, httpBody)
                )
              )
              ```
          required: true
          schema:
            type: string
            pattern: '^[0-9A-Fa-f]{128,160}$'
        - name: Api-Timestamp
          in: header
          description: 'Current timestamp, represented as unix epoch seconds'
          required: true
          schema:
            type: integer
            format: int64
      responses:
        '200':
          description: Success or Failure of the request
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/CancelSubaccountWithdrawalResponse'
        '400':
          description: Bad Request
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorDetails'
        '401':
          description: Unauthenticated
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorDetails'
        '403':
          description: Forbidden
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorDetails'
        '429':
          description: Too Many Requests
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorDetails'
        '500':
          description: Internal Server Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorDetails'
      tags:
        - Subaccounts
      x-security:
        Subaccount: present
    get:
      operationId: getSubaccountWithdrawal
      summary: Get USD Withdrawal Request for a subaccount
      description: |
        Permissions required: **Subaccount**
        Get a USD Withdrawal Request
      parameters:
        - name: subaccountId
          in: path
          description: Unique Identifier for the subaccount
          required: true
          schema:
            type: string
        - name: transactionId
          in: path
          description: Unique Identifier for the Withdrawal Transaction
          required: true
          schema:
            type: string
      responses:
        '200':
          description: Get the Withdrawal Request
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/GetSubaccountWithdrawalResponse'
        '400':
          description: Bad Request
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorDetails'
        '401':
          description: Unauthenticated
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorDetails'
        '403':
          description: Forbidden
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorDetails'
        '404':
          description: Not Found
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorDetails'
        '429':
          description: Too Many Requests
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorDetails'
        '500':
          description: Internal Server Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorDetails'
      tags:
        - Subaccounts
      x-security:
        Subaccount: present
  /subaccounts/billing/charges:
    post:
      operationId: createSubaccountBillingCharges
      summary: Create Manual Billing Charge
      description: |-
        Permissions required: **Subaccount**

        Create Manual Billing Charge
      parameters: []
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/CreateSubaccountBillingChargesRequest'
      responses:
        '200':
          description: Ids of the created billing charges
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/CreateSubaccountBillingChargesResponse'
        '400':
          description: Bad Request
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorDetails'
        '401':
          description: Unauthenticated
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorDetails'
        '403':
          description: Forbidden
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorDetails'
        '429':
          description: Too Many Requests
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorDetails'
        '500':
          description: Internal Server Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorDetails'
      tags:
        - Subaccounts
      x-security:
        Subaccount: present
  '/subaccounts/billing/charges/{chargeId}':
    delete:
      operationId: cancelSubaccountBillingCharge
      summary: Cancel Manual Billing Charge
      description: |-
        Permissions required: **Subaccount**

        Cancel Manual Billing Charge
      parameters:
        - name: chargeId
          in: path
          description: The id for your billing charge
          required: true
          schema:
            type: string
      responses:
        '200':
          description: Successfully deleted the billing charge
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/CancelSubaccountBillingChargeResponse'
        '400':
          description: Bad Request
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorDetails'
        '401':
          description: Unauthenticated
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorDetails'
        '403':
          description: Forbidden
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorDetails'
        '404':
          description: Billing charge not found
        '429':
          description: Too Many Requests
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorDetails'
        '500':
          description: Internal Server Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorDetails'
      tags:
        - Subaccounts
      x-security:
        Subaccount: present
  /tax/accounts:
    get:
      operationId: getTaxAccounts
      summary: List Tax Accounts
      description: List all tax accounts for the client's organization.
      parameters:
        - name: limit
          in: query
          description: Maximum number of results to return per query
          schema:
            type: integer
            format: int64
            default: 25
            maximum: 100
            minimum: 1
        - name: afterId
          in: query
          description: When paginating this is used to provide the starting point for the page to fetch (retrieved from the previous response body)
          schema:
            type: string
      responses:
        '200':
          description: Successfully returned list of tax accounts
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/TaxAccountsResponse'
        '400':
          description: Bad Request
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorDetails'
        '401':
          description: Unauthenticated
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorDetails'
        '403':
          description: Forbidden
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorDetails'
        '429':
          description: Too Many Requests
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorDetails'
        '500':
          description: Internal Server Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorDetails'
      tags:
        - Tax Reporting
      x-security:
        Write Tax: present
  '/tax/accounts/{accountId}/transactions':
    get:
      operationId: getTaxTransactionsForAccountId
      summary: List Deposit Transactions for Account
      description: List deposit transactions for a specific tax account.
      parameters:
        - name: accountId
          in: path
          description: The ID of the tax account
          required: true
          schema:
            type: string
        - name: startDate
          in: query
          description: 'The start date (inclusive) in `YYYY-MM-DD` format. Dates are always in UTC [RFC 3339](https://datatracker.ietf.org/doc/html/rfc3339#section-5.6) ''full-date''.'
          schema:
            type: string
            format: date
        - name: endDate
          in: query
          description: 'The end date (inclusive) in `YYYY-MM-DD` format. Dates are always in UTC [RFC 3339](https://datatracker.ietf.org/doc/html/rfc3339#section-5.6) ''full-date''.'
          schema:
            type: string
            format: date
        - name: limit
          in: query
          description: Maximum number of results to return per query
          schema:
            type: integer
            format: int64
            default: 25
            maximum: 100
            minimum: 1
        - name: afterId
          in: query
          description: When paginating this is used to provide the starting point for the page to fetch (retrieved from the previous response body)
          schema:
            type: string
        - name: hasCostBasis
          in: query
          description: 'Filter deposit transactions by cost basis presence. Set to `true` to return only transactions with cost basis, `false` for transactions without cost basis, or omit to return all transactions regardless of cost basis.'
          schema:
            type: boolean
      responses:
        '200':
          description: Successfully returned list of deposit transactions for the tax account
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/TaxAccountTransactionsResponse'
        '400':
          description: Bad Request
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorDetails'
        '401':
          description: Unauthenticated
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorDetails'
        '403':
          description: Forbidden
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorDetails'
        '429':
          description: Too Many Requests
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorDetails'
        '500':
          description: Internal Server Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorDetails'
      tags:
        - Tax Reporting
      x-security:
        Write Tax: present
  '/tax/accounts/{accountId}/transactions/{transactionId}':
    patch:
      operationId: updateTransactionCostBasis
      summary: Update Deposit Transaction Cost Basis
      description: 'Update the cost basis for a specific transaction. Allows customers to submit cost basis for assets that are deposited at Anchorage. Note, one deposit can contain up to 100 individual tax lots.'
      parameters:
        - name: accountId
          in: path
          description: The ID of the tax account
          required: true
          schema:
            type: string
        - name: transactionId
          in: path
          description: The ID of the transaction to update
          required: true
          schema:
            type: string
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/TaxTransactionUpdateCostBasisRequest'
      responses:
        '200':
          description: Successfully updated the transaction cost basis
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/TaxTransactionUpdateCostBasisResponse'
        '400':
          description: Bad Request
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorDetails'
        '401':
          description: Unauthenticated
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorDetails'
        '403':
          description: Forbidden
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorDetails'
        '404':
          description: Not Found
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorDetails'
        '429':
          description: Too Many Requests
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorDetails'
        '500':
          description: Internal Server Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorDetails'
      tags:
        - Tax Reporting
      x-security:
        Write Tax: present
  '/tax/transactions/{subaccountId}':
    get:
      operationId: getTaxTransactions
      summary: List Transactions
      description: |
        Permissions required: **Subaccount**


        List tax transactions of a subaccount.
      parameters:
        - name: subaccountId
          in: path
          description: The ID of the subaccount
          required: true
          schema:
            type: string
        - name: startDate
          in: query
          description: 'The start date (inclusive) in `YYYY-MM-DD` format. The earliest valid start date is `2017-01-01`. The last valid start date is the current date. Dates are always in UTC [RFC 3339](https://datatracker.ietf.org/doc/html/rfc3339#section-5.6) ''full-date''.'
          schema:
            type: string
            format: date
        - name: endDate
          in: query
          description: 'The end date (inclusive) in `YYYY-MM-DD` format. The latest valid end date is the current date. Dates are always in UTC [RFC 3339](https://datatracker.ietf.org/doc/html/rfc3339#section-5.6) ''full-date''.'
          schema:
            type: string
            format: date
      responses:
        '200':
          description: Successfully returned list of transactions
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/TaxTransactionsResponse'
        '400':
          description: Bad Request
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorDetails'
        '401':
          description: Unauthenticated
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorDetails'
        '403':
          description: Forbidden
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorDetails'
        '429':
          description: Too Many Requests
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorDetails'
        '500':
          description: Internal Server Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorDetails'
        '501':
          description: Not Implemented Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorDetails'
      tags:
        - Tax
      x-security:
        Subaccount: present
  '/tax/transaction/{transactionId}':
    patch:
      operationId: updateTaxTransaction
      summary: Update Transaction Cost Basis
      description: |
        Permissions required: **Subaccount**


        Update the cost basis for a deposit or withdraw transaction.
      parameters:
        - name: transactionId
          in: path
          description: The ID of the transaction to update (Same as the one returned for Transactions in the Subaccounts API )
          required: true
          schema:
            type: string
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/UpdateTaxTransactionRequest'
      responses:
        '200':
          description: Successfully updated the transaction
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/UpdateTaxTransactionResponse'
        '400':
          description: Bad Request
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorDetails'
        '401':
          description: Unauthenticated
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorDetails'
        '403':
          description: Forbidden
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorDetails'
        '404':
          description: Not Found
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorDetails'
        '429':
          description: Too Many Requests
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorDetails'
        '500':
          description: Internal Server Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorDetails'
        '501':
          description: Not Implemented Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorDetails'
      tags:
        - Tax
      x-security:
        Subaccount: present
  '/tax/transaction/{transactionId}/tag':
    post:
      operationId: tagTaxTransaction
      summary: Add Tag to Transaction
      description: |
        Permissions required: **Subaccount**


        Tag a prior transaction for tax purposes.

        ** Under development **
      parameters:
        - name: transactionId
          in: path
          description: The ID of the transaction to tag (Same as the one returned for Transactions in the Subaccounts API )
          required: true
          schema:
            type: string
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/TagTaxTransactionRequest'
      responses:
        '202':
          description: Accepted tagging request
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/TagTaxTransactionResponse'
        '400':
          description: Bad Request
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorDetails'
        '401':
          description: Unauthenticated
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorDetails'
        '403':
          description: Forbidden
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorDetails'
        '404':
          description: Not Found
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorDetails'
        '429':
          description: Too Many Requests
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorDetails'
        '500':
          description: Internal Server Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorDetails'
        '501':
          description: Not Implemented Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorDetails'
      tags:
        - Tax
      x-security:
        Subaccount: present
    delete:
      operationId: untagTaxTransaction
      summary: Remove Tag from Transaction
      description: |
        Permissions required: **Subaccount**


        Remove tax tag for a prior transaction.

        ** Under development **
      parameters:
        - name: transactionId
          in: path
          description: The ID of the transaction to tag (Same as the one returned for Transactions in the Subaccounts API )
          required: true
          schema:
            type: string
        - name: accountId
          in: query
          description: The subaccount for which the transaction happened.
          required: true
          schema:
            type: string
            example: SubaccountID
      responses:
        '202':
          description: Accepted tag removal request
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/UntagTaxTransactionResponse'
        '400':
          description: Bad Request
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorDetails'
        '401':
          description: Unauthenticated
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorDetails'
        '403':
          description: Forbidden
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorDetails'
        '404':
          description: Not Found
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorDetails'
        '429':
          description: Too Many Requests
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorDetails'
        '500':
          description: Internal Server Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorDetails'
        '501':
          description: Not Implemented Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorDetails'
      tags:
        - Tax
      x-security:
        Subaccount: present
  '/tax/inventory/{subaccountId}/{assetTypeId}':
    get:
      operationId: getTaxInventoryForAsset
      summary: List of the Inventory for an asset
      description: |
        Permissions required: **Subaccount**


        List user's inventory for an asset.
      parameters:
        - name: subaccountId
          in: path
          description: The ID of the subaccount
          required: true
          schema:
            type: string
        - name: assetTypeId
          in: path
          description: Asset type identifier.
          required: true
          schema:
            type: string
        - name: limit
          in: query
          description: Number of results
          schema:
            type: integer
            format: int64
            default: 25
            minimum: 0
        - name: offset
          in: query
          description: Offset of the results to start
          schema:
            type: integer
            format: int64
            default: 0
            minimum: 0
      responses:
        '200':
          description: Successfully returned the inventory for an asset
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/InventoryForAssetResponse'
        '400':
          description: Bad Request
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorDetails'
        '401':
          description: Unauthenticated
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorDetails'
        '403':
          description: Forbidden
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorDetails'
        '404':
          description: Not Found
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorDetails'
        '429':
          description: Too Many Requests
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorDetails'
        '500':
          description: Internal Server Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorDetails'
        '501':
          description: Not Implemented Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorDetails'
      tags:
        - Tax
      x-security:
        Subaccount: present
  '/tax/inventory/summary/{subaccountId}':
    get:
      operationId: getTaxInventorySummary
      summary: List summary of Inventory
      description: |
        Permissions required: **Subaccount**


        List user's inventory summary for all assets.
      parameters:
        - name: subaccountId
          in: path
          description: The ID of the subaccount
          required: true
          schema:
            type: string
        - name: limit
          in: query
          description: Number of results
          schema:
            type: integer
            format: int64
            default: 25
            minimum: 0
        - name: offset
          in: query
          description: Offset of the results to start
          schema:
            type: integer
            format: int64
            default: 0
            minimum: 0
      responses:
        '200':
          description: Successfully returned the inventory summary
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/InventorySummaryResponse'
        '400':
          description: Bad Request
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorDetails'
        '401':
          description: Unauthenticated
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorDetails'
        '403':
          description: Forbidden
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorDetails'
        '429':
          description: Too Many Requests
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorDetails'
        '500':
          description: Internal Server Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorDetails'
        '501':
          description: Not Implemented Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorDetails'
      tags:
        - Tax
      x-security:
        Subaccount: present
  '/tax/gains/costbasis/{subaccountId}':
    get:
      operationId: getTaxGainsCostBasis
      summary: List Gains Cost Basis
      description: |
        Permissions required: **Subaccount**



        List subaccount's breakdown of combined cost basis, proceeds and gains/losses
      parameters:
        - name: subaccountId
          in: path
          description: The ID of the subaccount
          required: true
          schema:
            type: string
        - name: startDateTime
          in: query
          description: ISO-8601 formatted date as a filter start date.
          required: true
          schema:
            type: string
            format: date-time
        - name: endDateTime
          in: query
          description: ISO-8601 formatted date as a filter end date.
          required: true
          schema:
            type: string
            format: date-time
      responses:
        '200':
          description: Successfully returned the subaccount's tax gains cost bases
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/TaxGainsCostBasisResponse'
        '400':
          description: Bad Request
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorDetails'
        '401':
          description: Unauthenticated
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorDetails'
        '403':
          description: Forbidden
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorDetails'
        '404':
          description: Not Found
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorDetails'
        '429':
          description: Too Many Requests
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorDetails'
        '500':
          description: Internal Server Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorDetails'
        '501':
          description: Not Implemented Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorDetails'
      tags:
        - Tax
      x-security:
        Subaccount: present
  '/tax/gains/summary/{subaccountId}':
    get:
      operationId: getTaxGains
      summary: List Gains
      description: |
        Permissions required: **Subaccount**



        List subaccount's gains for a period breakdown to short term, long term and total
      parameters:
        - name: subaccountId
          in: path
          description: The ID of the subaccount
          required: true
          schema:
            type: string
        - name: startDateTime
          in: query
          description: ISO-8601 formatted date as a filter start date.
          required: true
          schema:
            type: string
            format: date-time
        - name: endDateTime
          in: query
          description: ISO-8601 formatted date as a filter end date.
          required: true
          schema:
            type: string
            format: date-time
      responses:
        '200':
          description: Successfully returned the gains
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/TaxGainsResponse'
        '400':
          description: Bad Request
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorDetails'
        '401':
          description: Unauthenticated
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorDetails'
        '403':
          description: Forbidden
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorDetails'
        '404':
          description: Not Found
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorDetails'
        '429':
          description: Too Many Requests
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorDetails'
        '500':
          description: Internal Server Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorDetails'
        '501':
          description: Not Implemented Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorDetails'
      tags:
        - Tax
      x-security:
        Subaccount: present
  '/tax/subaccounts/{subaccountId}/forms':
    get:
      operationId: getSubaccountTaxForms
      summary: Get Subaccount Tax Forms
      description: |
        Permissions required: **Subaccount**


        Get subaccount's generated tax forms
      parameters:
        - name: subaccountId
          in: path
          description: The ID of the subaccount
          required: true
          schema:
            type: string
      responses:
        '200':
          description: Successfully returned the forms
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/TaxFormsResponse'
        '400':
          description: Bad Request
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorDetails'
        '401':
          description: Unauthenticated
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorDetails'
        '403':
          description: Forbidden
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorDetails'
        '404':
          description: Not Found
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorDetails'
        '429':
          description: Too Many Requests
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorDetails'
        '500':
          description: Internal Server Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorDetails'
        '501':
          description: Not Implemented Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorDetails'
      tags:
        - Tax
      x-security:
        Subaccount: present
  '/tax/clients/{customerId}/forms':
    get:
      operationId: getAffiliateTaxForms
      summary: Get Program Customer Tax Forms
      description: |
        Permissions required: **Subaccount**


        Get a program customer's generated tax forms
      parameters:
        - name: customerId
          in: path
          description: The ID of the customer
          required: true
          schema:
            type: string
      responses:
        '200':
          description: Successfully returned the forms
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/TaxFormsResponse'
        '400':
          description: Bad Request
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorDetails'
        '401':
          description: Unauthenticated
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorDetails'
        '403':
          description: Forbidden
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorDetails'
        '404':
          description: Not Found
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorDetails'
        '429':
          description: Too Many Requests
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorDetails'
        '500':
          description: Internal Server Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorDetails'
        '501':
          description: Not Implemented Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorDetails'
      tags:
        - Tax
      x-security:
        Subaccount: present
  /trading/quote:
    post:
      operationId: requestQuote
      summary: Request a quote
      description: |
        Permissions required: **Execute trades**


        Request a quote

        #### Idempotent Requests

        This endpoint supports [idempotent requests](#section/Idempotency) so that quote is not requested twice if an API call was interrupted and must be retried. To send an idempotent request, include the `idempotentId` field in the body of the POST request.
      parameters: []
      requestBody:
        description: |
          *Request for quote examples*

          **`BUY` quote requests:**
          - I want to buy the amount of BTC equivalent to 100 USD (I buy BTC and sell USD)
            ```
            {
              "tradingPair": "BTC-USD",
              "side": "BUY",
              "quantity": "100",
              "currency": "USD"
            }
            ```

          - I want to buy 1 BTC (I buy BTC and sell USD)
            ```
            {
              "tradingPair": "BTC-USD",
              "side": "BUY",
              "quantity": "1",
              "currency": "BTC"
            }
            ```

          - I want to buy the amount of ETH equivalent to 1 BTC (I buy ETH and sell BTC)
            ```
            {
              "tradingPair": "ETH-BTC",
              "side": "BUY",
              "quantity": "1",
              "currency": "BTC"
            }
            ```

          **`SELL` quote requests:**
          - I want to sell the amount of BTC equivalent to 100 USD (I sell BTC and buy USD)
            ```
            {
              "tradingPair": "BTC-USD",
              "side": "SELL",
              "quantity": "100",
              "currency": "USD"
            }
            ```

          - I want to sell 1 BTC (I sell BTC and buy USD)
            ```
            {
              "tradingPair": "BTC-USD",
              "side": "SELL",
              "quantity": "1",
              "currency": "BTC"
            }
            ```

          - I want to sell 1 ETH (I sell ETH and buy BTC)
            ```
            {
              "tradingPair": "ETH-BTC",
              "side": "SELL",
              "quantity": "1",
              "currency": "ETH"
            }
            ```

          **`TWOWAY` quote requests:**
          - I want two-way quotes to buy 1 ETH and sell BTC or to sell 1 ETH and buy BTC
            ```
            {
              "tradingPair": "ETH-BTC",
              "side": "TWOWAY",
              "quantity": "1",
              "currency": "ETH"
            }
            ```
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/GetQuoteRequest'
      responses:
        '201':
          description: Successfully created request for quote
          content:
            application/json:
              examples:
                response:
                  value:
                    data:
                      offerAmount:
                        assetType: USD
                        quantity: '11733.73'
                      offerPrice: '11733.73'
                      quoteID: 06f71d1e-e7e8-11ea-adc1-0242ac120002
                      quoteRequest:
                        currency: BTC
                        quantity: '1'
                        side: BUY
                        tradingPair: BTC-USD
                      quoteStatus: OPEN
                      timestamp: '2020-08-31T16:57:07.265Z'
                      validUntilTime: '2020-08-31T16:57:10.265Z'
              schema:
                $ref: '#/components/schemas/GetQuoteResponse'
        '400':
          description: Bad Request
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorDetails'
        '401':
          description: Unauthenticated
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorDetails'
        '403':
          description: Forbidden
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorDetails'
        '429':
          description: Too Many Requests
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorDetails'
        '500':
          description: Internal Server Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorDetails'
        '503':
          description: Service Unavailable
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorDetails'
      tags:
        - Trading
      x-security:
        Execute trades: present
  /trading/quote/accept:
    post:
      operationId: acceptQuote
      summary: Accept a quote
      description: |
        Permissions required: **Execute trades**


        Accept a quote by its quoteID and side.

        #### Idempotent Requests

        This endpoint supports [idempotent requests](#section/Idempotency) so that a quote cannot be accepted twice if an API call was interrupted and is retried. To send an idempotent request, include the `idempotentId` field in the body of the POST request.
      parameters:
        - name: Api-Signature
          in: header
          description: |-
            A hex-encoded Ed25519 signature of `timestamp_epoch_seconds + uppercase(http_method) + request_path + request_body`.

            Construction example:
            ```
              toHex(
                ed25519Sign(
                  signing_key,
                  '{}{}{}{}'.format(timestamp_epoch_seconds, toUpper(httpMethod), httpRequestPath, httpBody)
                )
              )
            ```
          required: true
          schema:
            type: string
            pattern: '^[0-9A-Fa-f]{128,160}$'
        - name: Api-Timestamp
          in: header
          description: 'Current timestamp, represented as unix epoch seconds'
          required: true
          schema:
            type: integer
            format: int64
      requestBody:
        description: |-
          Request body to accept a quote
          example:
          ```
            {
              "quoteID": "06f71d1e-e7e8-11ea-adc1-0242ac120002",
              "side": "BUY",
            }
          ```
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/AcceptQuoteRequest'
      responses:
        '200':
          description: Successfully accepted the quote
          content:
            application/json:
              examples:
                response:
                  value:
                    data:
                      quoteID: 06f71d1e-e7e8-11ea-adc1-0242ac120002
                      side: BUY
                      tradeStatus: EXECUTED
                      tradeID: d1ae1416-ebd7-11ea-adc1-0242ac120002
              schema:
                $ref: '#/components/schemas/AcceptQuoteResponse'
        '400':
          description: Bad Request
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorDetails'
        '401':
          description: Unauthenticated
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorDetails'
        '403':
          description: Forbidden
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorDetails'
        '404':
          description: Not Found. The specified quoteID is either invalid or expired.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorDetails'
        '409':
          description: Trade already exists
          content:
            application/json:
              examples:
                response:
                  value:
                    errorType: Conflict
                    message: 'tradeID=07ceab88-944f-4ea7-9ebf-9d1f5672b59a,tradeStatus=EXECUTED'
              schema:
                $ref: '#/components/schemas/ErrorDetails'
        '422':
          description: Request exceeds credit limit
          content:
            application/json:
              examples:
                response:
                  value:
                    errorType: UnprocessableEntity
                    message: The amount requested exceeds credit limit
              schema:
                $ref: '#/components/schemas/ErrorDetails'
        '429':
          description: Too Many Requests
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorDetails'
        '500':
          description: Internal Server Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorDetails'
      tags:
        - Trading
      x-security:
        Execute trades: present
  /trading/order:
    post:
      operationId: newOrderSingle
      summary: Place an order
      description: |-
        Permissions required: **Execute trades**

        Place an order, either Market or Limit, currently only FillOrKill is supported.

        One of `accountId` or `subaccountId` must be specified but not both.
      parameters: []
      requestBody:
        description: Parameters to place an order.
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/NewOrderSingle'
      responses:
        '201':
          description: Successfully executed an order
          content:
            application/json:
              examples:
                response:
                  value:
                    data:
                      clOrderId: 6fb5fc79-0bb4-446d-82dd-d4687fb56a02
                      orderId: a94c8d75-6c9d-4903-95f3-5b0893e76cb7
                      execId: 3fb532c79-0bb4-446d-82dd-d4687fb56a02
                      accountId: 0e2b2f9d-8d10-4f1e-960b-28567255045f
                      symbol: BTC-USD
                      side: BUY
                      currency: USD
                      counterCurrency: BTC
                      orderType: MARKET
                      orderStatus: FILLED
                      avgPx: '21005.4'
                      avgPxAllIn: '21006.00'
                      orderQty: '10000.00'
                      cumQty: '10000.00'
                      counterQty: '0.4760680586896702'
                      fee: '0.00001359805'
                      feeCurrency: BTC
                      counterQtyAllIn: '0.4760544606302961'
                      transactTime: '2022-11-20T20:32:16.423Z'
              schema:
                $ref: '#/components/schemas/TradingOrderResponse'
        '400':
          description: Bad Request
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorDetails'
        '401':
          description: Unauthenticated
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorDetails'
        '403':
          description: Forbidden
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorDetails'
        '429':
          description: Too Many Requests
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorDetails'
        '500':
          description: Internal Server Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorDetails'
        '503':
          description: Service Unavailable
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorDetails'
      tags:
        - Trading
      x-security:
        Execute trades: present
  /trading/orders:
    get:
      operationId: getOrdersStatus
      summary: List orders
      description: |-
        Permissions required: **Execute trades** or **Read trade activity**

        List all orders. With the permission **Read trade activity** all orders of the organization may be read. With the permission **Execute trades** only the orders created by this API key may be read.

        Orders are sorted in a descending order by their timestamp, i.e. the most recent order or the order with a timestamp closest to `endDate` is listed first.

        When filtering by `subaccountId`, the allocation information is included but filtered to show only the allocation for the requested subaccount.
        For multi-order requests without a subaccount filter, allocation information is not included.
        To get complete allocation information, use [GET `/v2/trading/orders/{orderId}`](#tag/Trading/operation/getOrderStatus)

        #### Filters

        You may optionally supply filters for the list of orders using query parameters below
      parameters:
        - name: accountId
          in: query
          description: 'The ID of the account to filter orders by. If provided, only orders for this account will be returned.'
          schema:
            type: string
        - name: subaccountId
          in: query
          description: 'The ID of the subaccount to filter orders by. If provided, only orders for this subaccount will be returned.'
          schema:
            type: string
        - name: startDateTime
          in: query
          description: 'The start date-time of the trades (exclusive) in `YYYY-MM-DDTHH:MM:SS.nnnnnnnnn` format. The earliest valid start date-time is ''2017-01-01T00:00:00.000000000''. The last valid start date-time is the current date-time. Date-times are always in UTC [RFC 3339](https://datatracker.ietf.org/doc/html/rfc3339#section-5.6) ''date-time''.'
          schema:
            type: string
            format: date-time
        - name: endDateTime
          in: query
          description: 'The end date-time of the trades (exclusive) in `YYYY-MM-DDTHH:MM:SS.nnnnnnnnn` format. The latest valid end date-time is the current date-time. The earliest valid end date-time is ''2017-01-01T00:00:00.000000000''. Date-times are always in UTC [RFC 3339](https://datatracker.ietf.org/doc/html/rfc3339#section-5.6) ''date-time''.'
          schema:
            type: string
            format: date-time
        - name: status
          in: query
          description: 'One or more statuses to filter orders. If provided, only orders matching these statuses will be returned. If `OPEN` status is specified, the call returns all orders in [PENDING,NEW,PENDING_CANCEL,PARTIALLY_FILLED] states.'
          schema:
            type: array
            items:
              type: string
              enum:
                - OPEN
                - REJECTED
                - CANCELED
                - FILLED
            uniqueItems: true
          explode: false
          style: form
        - name: orderIds
          in: query
          description: A list of `orderIds` to return. Invalid `orderIds` will be ignored. A maximum number of unique 500 order ids are enforced per call.
          schema:
            type: array
            items:
              type: string
            maxItems: 500
            minItems: 1
            uniqueItems: true
          explode: false
          style: form
        - name: clientOrderIds
          in: query
          description: A list of `clientOrderIds` to return. Invalid `clientOrderIds` will be ignored. A maximum number of unique 500 order ids are enforced per call.
          schema:
            type: array
            items:
              type: string
            maxItems: 500
            minItems: 1
            uniqueItems: true
          explode: false
          style: form
        - name: limit
          in: query
          description: Maximum number of results to return per query
          schema:
            type: integer
            format: int64
            default: 100
            maximum: 2000
            minimum: 1
        - name: orderTypes
          in: query
          description: 'One or more types to filter orders. If provided, only orders matching these types will be returned.'
          schema:
            type: array
            items:
              type: string
              enum:
                - LIMIT
                - MARKET
                - STOP_LOSS
                - STOP_LIMIT
                - TAKE_PROFIT_LIMIT
                - TWAP
                - VWAP
                - PEGGED
                - POV
                - LIMIT_ALL_IN
                - MANUAL
                - OTHER
            uniqueItems: true
          explode: false
          style: form
      responses:
        '200':
          description: A list of Orders and their last status
          content:
            application/json:
              examples:
                response:
                  value:
                    data:
                      - orderId: c6d8c4a8-e883-4ae3-9f35-4a35d06c383d
                        clOrderId: 40d846b7-6efb-48fa-acc9-dcace827c927
                        accountId: a05a846f-4ef0-11ed-a291-dafe71b41c83
                        symbol: BTC-USD
                        side: BUY
                        orderQty: '1.0'
                        currency: BTC
                        orderType: MARKET
                        timeInForce: GTC
                        orderStatus: FILLED
                        avgPx: '22840.9299'
                        avgPxAllIn: '22863.7708299'
                        leavesQty: '0.0'
                        cancelQty: '0.0'
                        cumQty: '1.0'
                        totalFee: '25.35'
                        feeCurrency: USD
                        rejectReason: ''
                        rejectReasonText: ''
                        submitTime': '2023-03-07T19:49:06.286737Z'
                        transactTime: '2023-03-07T19:49:06.314322Z'
                    page:
                      next: '/v2/trading/orders?endDate=2020-08-31T22:14:07Z&limit=2'
              schema:
                $ref: '#/components/schemas/OrdersStatusResponse'
        '400':
          description: Bad Request
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorDetails'
        '401':
          description: Unauthenticated
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorDetails'
        '403':
          description: Forbidden
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorDetails'
        '404':
          description: Not Found
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorDetails'
        '429':
          description: Too Many Requests
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorDetails'
        '500':
          description: Internal Server Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorDetails'
      tags:
        - Trading
      x-security:
        Execute trades: present
        Read trade activity: present
  '/trading/orders/{orderId}':
    get:
      operationId: getOrderStatus
      summary: Get order by ID
      description: |-
        Permissions required: **Read trade activity** or **Execute trades** (if order created by this API key)

        Get order by ID, where the ID can be anchorage generated orderId or clientOrderId
      parameters:
        - name: orderId
          in: path
          description: The orderId or clientOrderId for the order to get details for
          required: true
          schema:
            type: string
      responses:
        '200':
          description: Metadata about a specific trade
          content:
            application/json:
              examples:
                response:
                  value:
                    data:
                      orderId: c6d8c4a8-e883-4ae3-9f35-4a35d06c383d
                      clOrderId: 40d846b7-6efb-48fa-acc9-dcace827c927
                      accountId: a05a846f-4ef0-11ed-a291-dafe71b41c83
                      symbol: BTC-USD
                      side: BUY
                      orderQty: '1.0'
                      currency: BTC
                      orderType: LIMIT
                      limitPrice: '22840.9299'
                      timeInForce: GTC
                      orderStatus: FILLED
                      avgPx: '22840.9299'
                      avgPxAllIn: '22863.7708299'
                      leavesQty: '0.0'
                      cancelQty: '0.0'
                      cumQty: '1.0'
                      totalFee: '25.35'
                      feeCurrency: USD
                      rejectReason: ''
                      rejectReasonText: ''
                      submitTime': '2023-03-07T19:49:06.286737Z'
                      transactTime: '2023-03-07T19:49:06.314322Z'
              schema:
                $ref: '#/components/schemas/OrderStatusResponse'
        '400':
          description: Bad Request
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorDetails'
        '401':
          description: Unauthenticated
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorDetails'
        '403':
          description: Forbidden
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorDetails'
        '404':
          description: Not Found
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorDetails'
        '429':
          description: Too Many Requests
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorDetails'
        '500':
          description: Internal Server Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorDetails'
      tags:
        - Trading
      x-security:
        Execute trades: present
        Read trade activity: present
  /trading/trades:
    get:
      operationId: getTrades
      summary: List trades
      description: |-
        Permissions required: **Execute trades** or **Read trade activity**

        List all trades. With the permission **Read trade activity** all trades of the organization may be read. With the permission **Execute trades** only the trades created by this API key may be read.

        Trades are sorted in a descending order by their timestamp, i.e. the most recent trade or the trade with a timestamp closest to `endDate` is listed first.

        #### Filters

        You may optionally supply the following filters:

        - Specify a `tradingPair` to filter by the trading pair of the trade, for example `BTC-USD`.
        - Specify one or multiple `status` to filter trades. Multiple statuses should be separated by commas.
        - Specify a `side` to filter by the side of the trade.
      parameters:
        - name: startDate
          in: query
          description: 'The start date of the trades (inclusive) in `YYYY-MM-DD` format. The earliest valid start date is `2017-01-01`. The last valid start date is the current date. A `startDate` of ''2021-01-10'' is equivalent to a `startDateTime` of ''2021-01-10.00:00:00.000000000''. Dates are always in UTC [RFC 3339](https://datatracker.ietf.org/doc/html/rfc3339#section-5.6) ''full-date''.'
          schema:
            type: string
            format: date
        - name: endDate
          in: query
          description: 'The end date of the trades (exclusive) in `YYYY-MM-DD` format. The latest valid end date is the current date. If not provided, defaults to the most recently closed day. An `endDate` of ''2021-01-10'' is equivalent to an `endDateTime` of ''2021-01-10.00:00:00.000000000''. Dates are always in UTC [RFC 3339](https://datatracker.ietf.org/doc/html/rfc3339#section-5.6) ''full-date''.'
          schema:
            type: string
            format: date
        - name: startDateTime
          in: query
          description: 'The start date-time of the trades (exclusive) in `YYYY-MM-DDTHH:MM:SS.nnnnnnnnn` format. The earliest valid start date-time is ''2017-01-01T00:00:00.000000000''. The last valid start date-time is the current date-time. `startDateTime` will be used if both `startDate` and `startDateTime` are specified. Date-times are always in UTC [RFC 3339](https://datatracker.ietf.org/doc/html/rfc3339#section-5.6) ''date-time''.'
          schema:
            type: string
            format: date-time
        - name: endDateTime
          in: query
          description: 'The end date-time of the trades (exclusive) in `YYYY-MM-DDTHH:MM:SS.nnnnnnnnn` format. The latest valid end date-time is the current date-time. The earliest valid end date-time is ''2017-01-01T00:00:00.000000000''. `endDateTime` will be used if both `endDate` and `endDateTime` are specified. Date-times are always in UTC [RFC 3339](https://datatracker.ietf.org/doc/html/rfc3339#section-5.6) ''date-time''.'
          schema:
            type: string
            format: date-time
        - name: status
          in: query
          description: 'One or more statuses to filter trades. If provided, only trades matching these statuses will be returned.'
          schema:
            type: array
            items:
              type: string
              enum:
                - PENDING
                - REJECTED
                - CANCELED
                - EXECUTED
                - SETTLING
                - SETTLED
            uniqueItems: true
          explode: false
          style: form
        - name: side
          in: query
          description: 'Filter by the side of a trade. If provided, only trades matching this side will be returned.'
          schema:
            type: string
            enum:
              - BUY
              - SELL
        - name: tradingPair
          in: query
          description: 'Filter by the trading pair of a trade. If provided, only trades matching this pair of assets will be returned.'
          schema:
            type: string
        - name: accountId
          in: query
          description: 'Filter by the trading account ID of a trade. If provided, only trades linked to this account ID will be returned.'
          schema:
            type: string
        - name: subaccountId
          in: query
          description: 'Filter by the trading account ID of a trade. If provided, only trades linked to this account ID will be returned.'
          schema:
            type: string
        - name: orderId
          in: query
          description: 'Filter by the order ID of a trade. The orderId is the anchorage orderId on execution report. If provided, only trades of the specified order will be returned.'
          schema:
            type: string
        - name: vaultId
          in: query
          description: 'Filter by the vault ID of a trade. If provided, only trades linked to this vault ID will be returned.'
          schema:
            type: string
        - name: tradeIds
          in: query
          description: A list of `tradeIds` to return. Invalid `tradeIds` will be ignored. A maximum number of unique 500 trade ids are enforced per call.
          schema:
            type: array
            items:
              type: string
            maxItems: 500
            minItems: 1
            uniqueItems: true
          explode: false
          style: form
        - name: limit
          in: query
          description: Maximum number of results to return per query
          schema:
            type: integer
            format: int64
            default: 100
            maximum: 2000
            minimum: 1
      responses:
        '200':
          description: A list of Trades and their metadata
          content:
            application/json:
              examples:
                response:
                  value:
                    data:
                      - quantitySold: '1'
                        currencySold: USD
                        currencyBought: BTC
                        price: '11681.67'
                        quantityBought: '0.00008561'
                        side: BUY
                        timestamp: '2020-08-31T22:15:31.99999Z'
                        tradeID: e0538774-ebd9-11ea-adc1-0242ac120002
                        quoteID: 06f71d1e-e7e8-11ea-adc1-0242ac120011
                        vault:
                          vaultID: 1c920f4241b78a1d483a29f3c24b6c4c
                        tradeStatus: EXECUTED
                        tradingPair: BTC-USD
                        fee: '0.01'
                        feeCurrency: USD
                      - quantitySold: '1'
                        currencySold: USD
                        currencyBought: ETH
                        price: '435.16'
                        quantityBought: '0.00230049'
                        side: BUY
                        timestamp: '2020-08-31T22:14:07.99999Z'
                        tradeID: d1ae1416-ebd7-11ea-adc1-0242ac120002
                        quoteID: 06f71d1e-e7e8-11ea-adc1-0242ac120002
                        vault:
                          vaultID: 1c920f4241b78a1d483a29f3c24b6c4c
                        tradeStatus: EXECUTED
                        tradingPair: ETH-USD
                        fee: '0.01'
                        feeCurrency: USD
                    page:
                      next: '/v2/trading/trades?endDate=2020-08-31T22:14:07Z&limit=2'
              schema:
                $ref: '#/components/schemas/TradesResponse'
        '400':
          description: Bad Request
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorDetails'
        '401':
          description: Unauthenticated
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorDetails'
        '403':
          description: Forbidden
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorDetails'
        '429':
          description: Too Many Requests
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorDetails'
        '500':
          description: Internal Server Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorDetails'
      tags:
        - Trading
      x-security:
        Execute trades: present
        Read trade activity: present
  '/trading/trades/{tradeId}':
    get:
      operationId: getTrade
      summary: Get trade by ID
      description: |-
        Permissions required: **Read trade activity** or **Execute trades** (if trade created by this API key)

        Get trade by ID.
      parameters:
        - name: tradeId
          in: path
          description: The ID of the trade to get details for
          required: true
          schema:
            type: string
      responses:
        '200':
          description: Metadata about a specific trade
          content:
            application/json:
              examples:
                response:
                  value:
                    data:
                      quantitySold: '1'
                      currencySold: USD
                      currencyBought: BTC
                      price: '11681.67'
                      quantityBought: '0.00008561'
                      side: BUY
                      timestamp: '2020-08-31T22:15:31.99999Z'
                      tradeID: e0538774-ebd9-11ea-adc1-0242ac120002
                      quoteID: 06f71d1e-e7e8-11ea-adc1-0242ac120011
                      vault:
                        vaultID: 1c920f4241b78a1d483a29f3c24b6c4c
                      tradeStatus: EXECUTED
                      tradingPair: BTC-USD
                      fee: '0.01'
                      feeCurrency: USD
              schema:
                $ref: '#/components/schemas/TradeResponse'
        '400':
          description: Bad Request
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorDetails'
        '401':
          description: Unauthenticated
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorDetails'
        '403':
          description: Forbidden
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorDetails'
        '404':
          description: Not Found
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorDetails'
        '429':
          description: Too Many Requests
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorDetails'
        '500':
          description: Internal Server Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorDetails'
      tags:
        - Trading
      x-security:
        Execute trades: present
        Read trade activity: present
  /trading/positions:
    get:
      operationId: getTradingPositions
      summary: List outstanding trading positions
      description: |-
        Permissions required: **Execute trades** or **Read trade activity**

        Get the list of outstanding trading positions.
      parameters: []
      responses:
        '200':
          description: Successfully returned the list of outstanding trading positions
          content:
            application/json:
              examples:
                response:
                  value:
                    data:
                      - positionAmount:
                          assetType: BTC
                          quantity: '30.54447726'
                      - positionAmount:
                          assetType: ETH
                          quantity: '8391'
                      - positionAmount:
                          assetType: USD
                          quantity: '-100276.38'
              schema:
                $ref: '#/components/schemas/TradingPositionsResponse'
        '400':
          description: Bad Request
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorDetails'
        '401':
          description: Unauthenticated
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorDetails'
        '403':
          description: Forbidden
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorDetails'
        '429':
          description: Too Many Requests
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorDetails'
        '500':
          description: Internal Server Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorDetails'
      tags:
        - Trading
      x-security:
        Execute trades: present
        Read trade activity: present
  /trading/settlements:
    get:
      operationId: getSettlements
      summary: List settlements
      description: |-
        Permissions required: **Execute trades** or **Read trade activity**

        List of all settlements. With permission **Read trade activity** all settlements of the organization may be read. With permission **Execute trades** only settlements this api key has created may be read.

        Settlements are sorted in a descending order by their timestamp, i.e. the most recent settlement or the settlement with a timestamp closest to `endDate` is listed first.

        #### Filters

        You may optionally supply the following filters:

        - Specify a one or multiple `status` to filter settlements. Multiple statuses should be separated by commas.
      parameters:
        - name: startDate
          in: query
          description: 'The start date (inclusive) in `YYYY-MM-DD` format. The earliest valid start date is `2017-01-01`. The last valid start date is the current date. Dates are always in UTC [RFC 3339](https://datatracker.ietf.org/doc/html/rfc3339#section-5.6) ''full-date''.'
          schema:
            type: string
            format: date
        - name: endDate
          in: query
          description: 'The end date (inclusive) in `YYYY-MM-DD` format. The latest valid end date is the current date. Dates are always in UTC [RFC 3339](https://datatracker.ietf.org/doc/html/rfc3339#section-5.6) ''full-date''.'
          schema:
            type: string
            format: date
        - name: status
          in: query
          description: 'One or more statuses to filter settlements. If provided, only settlements matching these statuses will be returned.'
          schema:
            type: array
            items:
              type: string
              enum:
                - REJECTED
                - CANCELED
                - EXECUTED
                - SETTLING
                - SETTLED
            uniqueItems: true
          explode: false
          style: form
        - name: vaultID
          in: query
          description: 'Filter by the vault ID of a settlement. If provided, only settlements linked to this vault ID will be returned.'
          schema:
            type: string
        - name: limit
          in: query
          description: Maximum number of results to return per query
          schema:
            type: integer
            format: int64
            default: 100
            maximum: 100
            minimum: 1
        - name: excludePositions
          in: query
          description: 'If `true`, `positions` property will be excluded from the response. If `false`, `positions` will be included in the response as demonstrated in the example.'
          schema:
            type: boolean
            default: false
        - name: excludeSettlementInstructions
          in: query
          description: 'If `true`, `instructionsCrypto` property will be excluded from the response. If `false`, it will be included in the response as demonstrated in the example.'
          schema:
            type: boolean
            default: false
        - name: accountId
          in: query
          description: 'Filter by the trading account ID of a trade. If provided, only trades linked to this account ID will be returned.'
          schema:
            type: string
      responses:
        '200':
          description: A list of Settlements and their metadata
          content:
            application/json:
              examples:
                response:
                  value:
                    data:
                      - createdAt: '2020-11-10T20:24:20Z'
                        settlementID: c8e2fcb6-78fa-4b8a-8f6d-e3ff23093dd0
                        settlementStatus: SETTLED
                        vault:
                          vaultID: 1c920f4241b78a1d483a29f3c24b6c4c
                        trades:
                          - quantitySold: '1'
                            currencySold: USD
                            currencyBought: BTC
                            price: '11681.67'
                            quantityBought: '0.00008561'
                            side: BUY
                            timestamp: '2020-08-31T22:15:31.99999Z'
                            tradeID: e0538774-ebd9-11ea-adc1-0242ac120002
                            quoteID: 06f71d1e-e7e8-11ea-adc1-0242ac120011
                            vault:
                              vaultID: 1c920f4241b78a1d483a29f3c24b6c4c
                            tradeStatus: SETTLED
                            tradingPair: BTC-USD
                            fee: '0.01'
                            feeCurrency: USD
                          - quantitySold: '1'
                            currencySold: USD
                            currencyBought: ETH
                            price: '435.16'
                            quantityBought: '0.00230049'
                            side: BUY
                            timestamp: '2020-08-31T22:14:07.99999Z'
                            tradeID: d1ae1416-ebd7-11ea-adc1-0242ac120002
                            quoteID: 06f71d1e-e7e8-11ea-adc1-0242ac120002
                            vault:
                              vaultID: 1c920f4241b78a1d483a29f3c24b6c4c
                            tradeStatus: SETTLED
                            tradingPair: ETH-USD
                            fee: '0.01'
                            feeCurrency: USD
                        positions:
                          - positionAmount:
                              assetType: BTC
                              quantity: '30.54447726'
                          - positionAmount:
                              assetType: ETH
                              quantity: '8391'
                        instructionsCrypto:
                          - address: cosmos10tucpr3m3rgaexzy0yf0j903mp3f6xsm02al50
                            assetTypeID: ATOM
                          - address: 'bitcoincash:qq5z3pjyf2r3h9dyze644adywsr3vcncry2lmkvjlw'
                            assetTypeID: BCH
                          - address: 3HZdacGTDVcWwjwKCb7sEoD3kVTxJ7d25P
                            assetTypeID: BTC
                          - address: '0xd52055A39a3d2f7505C739f981f296Ea31B50191'
                            assetTypeID: ETH
                      - createdAt: '2020-11-10T15:39:05Z'
                        settlementID: w9e8hjq3-66rz-0j2n-1k6t-a2cg9834tt7
                        settlementStatus: SETTLING
                        vault:
                          vaultID: 1c920f4241b78a1d483a29f3c24b6c4c
                        trades:
                          - quantitySold: '590000'
                            currencySold: USD
                            currencyBought: BTC
                            price: '43574.59'
                            quantityBought: '13.54'
                            side: BUY
                            timestamp: '2020-08-31T22:15:31.99999Z'
                            tradeID: df4d3b1a-f70f-42c3-87e3-18a98c98c959
                            quoteID: f3857ede-9eeb-468e-8124-75458cff0229
                            vault:
                              vaultID: 1c920f4241b78a1d483a29f3c24b6c4c
                            tradeStatus: SETTLING
                            tradingPair: BTC-USD
                            fee: '457.16'
                            feeCurrency: USD
                        positions:
                          - positionAmount:
                              assetType: BTC
                              quantity: '30.54447726'
                        instructionsCrypto:
                          - address: cosmos10tucpr3m3rgaexzy0yf0j903mp3f6xsm02al50
                            assetTypeID: ATOM
                          - address: 'bitcoincash:qq5z3pjyf2r3h9dyze644adywsr3vcncry2lmkvjlw'
                            assetTypeID: BCH
                          - address: 3HZdacGTDVcWwjwKCb7sEoD3kVTxJ7d25P
                            assetTypeID: BTC
                          - address: '0xd52055A39a3d2f7505C739f981f296Ea31B50191'
                            assetTypeID: ETH
                    page:
                      next: /v2/trading/settlements?endDate=2020-11-10&limit=2
              schema:
                $ref: '#/components/schemas/SettlementsResponse'
        '400':
          description: Bad Request
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorDetails'
        '401':
          description: Unauthenticated
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorDetails'
        '403':
          description: Forbidden
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorDetails'
        '429':
          description: Too Many Requests
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorDetails'
        '500':
          description: Internal Server Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorDetails'
      tags:
        - Trading
      x-security:
        Execute trades: present
        Read trade activity: present
  '/trading/settlements/{settlementId}':
    get:
      operationId: getSettlement
      summary: Get settlement by ID
      description: |-
        Permissions required: **Execute trades** or **Read trade activity**

        Get settlement details by ID.
      parameters:
        - name: settlementId
          in: path
          description: The ID of the settlement to get details for
          required: true
          schema:
            type: string
        - name: excludeTrades
          in: query
          description: 'If `true`, `trades` property will be excluded from the response. If `false`, `trades` will be included in the response as demonstrated in the example. In order to get the full list of trades for a settlement, favor the usage of the [list trades by settlement](#operation/getTradesBySettlement) API endpoint.'
          schema:
            type: boolean
            default: false
        - name: excludePositions
          in: query
          description: 'If `true`, `positions` property will be excluded from the response. If `false`, `positions` will be included in the response as demonstrated in the example.'
          schema:
            type: boolean
            default: false
        - name: excludeSettlementInstructions
          in: query
          description: 'If `true`, `instructionsCrypto` property will be excluded from the response. If `false`, it will be included in the response as demonstrated in the example.'
          schema:
            type: boolean
            default: false
      responses:
        '200':
          description: Metadata about a specific settlement
          content:
            application/json:
              examples:
                response:
                  value:
                    data:
                      createdAt: '2020-11-10T20:24:20Z'
                      settlementID: c8e2fcb6-78fa-4b8a-8f6d-e3ff23093dd0
                      settlementStatus: EXECUTED
                      vault:
                        vaultID: 1c920f4241b78a1d483a29f3c24b6c4c
                      trades:
                        - quantitySold: '1'
                          currencySold: USD
                          currencyBought: BTC
                          price: '11681.67'
                          quantityBought: '0.00008561'
                          side: BUY
                          timestamp: '2020-08-31T22:15:31.99999Z'
                          tradeID: e0538774-ebd9-11ea-adc1-0242ac120002
                          quoteID: 06f71d1e-e7e8-11ea-adc1-0242ac120011
                          vault:
                            vaultID: 1c920f4241b78a1d483a29f3c24b6c4c
                          tradeStatus: EXECUTED
                          tradingPair: BTC-USD
                          fee: '0.01'
                          feeCurrency: USD
                        - quantitySold: '1'
                          currencySold: USD
                          currencyBought: ETH
                          price: '435.16'
                          quantityBought: '0.00230049'
                          side: BUY
                          timestamp: '2020-08-31T22:14:07.99999Z'
                          tradeID: d1ae1416-ebd7-11ea-adc1-0242ac120002
                          quoteID: 06f71d1e-e7e8-11ea-adc1-0242ac120002
                          vault:
                            vaultID: 1c920f4241b78a1d483a29f3c24b6c4c
                          tradeStatus: EXECUTED
                          tradingPair: ETH-USD
                          fee: '0.01'
                          feeCurrency: USD
                      positions:
                        - positionAmount:
                            assetType: BTC
                            quantity: '30.54447726'
                        - positionAmount:
                            assetType: ETH
                            quantity: '8391'
                      instructionsCrypto:
                        - address: cosmos10tucpr3m3rgaexzy0yf0j903mp3f6xsm02al50
                          assetTypeID: ATOM
                        - address: 'bitcoincash:qq5z3pjyf2r3h9dyze644adywsr3vcncry2lmkvjlw'
                          assetTypeID: BCH
                        - address: 3HZdacGTDVcWwjwKCb7sEoD3kVTxJ7d25P
                          assetTypeID: BTC
                        - address: '0xd52055A39a3d2f7505C739f981f296Ea31B50191'
                          assetTypeID: ETH
              schema:
                $ref: '#/components/schemas/SettlementResponse'
        '400':
          description: Bad Request
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorDetails'
        '401':
          description: Unauthenticated
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorDetails'
        '403':
          description: Forbidden
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorDetails'
        '404':
          description: Not Found
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorDetails'
        '429':
          description: Too Many Requests
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorDetails'
        '500':
          description: Internal Server Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorDetails'
      tags:
        - Trading
      x-security:
        Execute trades: present
        Read trade activity: present
  '/trading/settlements/{settlementId}/trades':
    get:
      operationId: getTradesBySettlement
      summary: List trades by settlement
      description: |-
        Permissions required: **Execute trades** or **Read trade activity**

        List trades for the provided settlement. With the permission **Read trade activity** all trades of the organization may be read. With the permission **Execute trades** only the trades created by this API key may be read.

        Trades are sorted in a descending order by their timestamp (i.e. the most recent trade or the trade with a timestamp closest to `endDateTime` is listed first).
      parameters:
        - name: settlementId
          in: path
          description: The ID of the settlement to retrieve
          required: true
          schema:
            type: string
        - name: startDateTime
          in: query
          description: 'The start date-time of the trades in `YYYY-MM-DDTHH:MM:SS.nnnnnnnnn` format. The earliest valid start date-time is ''2017-01-01T00:00:00.000000000''. Date-times are always in UTC [RFC 3339](https://datatracker.ietf.org/doc/html/rfc3339#section-5.6) ''date-time''.'
          schema:
            type: string
            format: date-time
        - name: endDateTime
          in: query
          description: 'The end date-time of the trades (exclusive) in `YYYY-MM-DDTHH:MM:SS.nnnnnnnnn` format. Defaults to the current date-time if not specified. `endDateTime` must be after `startDateTime`. Date-times are always in UTC [RFC 3339](https://datatracker.ietf.org/doc/html/rfc3339#section-5.6) ''date-time''.'
          schema:
            type: string
            format: date-time
        - name: side
          in: query
          description: 'Filter by the side of a trade. If provided, only trades matching this side will be returned.'
          schema:
            type: string
            enum:
              - BUY
              - SELL
        - name: tradingPair
          in: query
          description: 'Filter by the trading pair of a trade. If provided, only trades matching this pair of assets will be returned.'
          schema:
            type: string
        - name: afterId
          in: query
          description: When paginating this is used to provide the starting point for the page to fetch (retrieved from the previous response body)
          schema:
            type: string
        - name: limit
          in: query
          description: Maximum number of results to return per query
          schema:
            type: integer
            format: int64
            default: 100
            maximum: 2000
            minimum: 1
      responses:
        '200':
          description: A list of Trades and their metadata
          content:
            application/json:
              examples:
                response:
                  value:
                    data:
                      - quantitySold: '1'
                        currencySold: USD
                        currencyBought: BTC
                        price: '11681.67'
                        quantityBought: '0.00008561'
                        side: BUY
                        timestamp: '2020-08-31T22:15:31.99999Z'
                        tradeID: e0538774-ebd9-11ea-adc1-0242ac120002
                        quoteID: 06f71d1e-e7e8-11ea-adc1-0242ac120011
                        vault:
                          vaultID: 419f3483a26c4c0f42c24bb78a1d1c92
                        tradeStatus: EXECUTED
                        tradingPair: BTC-USD
                        fee: '0.01'
                        feeCurrency: USD
                      - quantitySold: '1'
                        currencySold: USD
                        currencyBought: ETH
                        price: '435.16'
                        quantityBought: '0.00230049'
                        side: BUY
                        timestamp: '2020-08-31T22:14:07.99999Z'
                        tradeID: d1ae1416-ebd7-11ea-adc1-0242ac120002
                        quoteID: 06f71d1e-e7e8-11ea-adc1-0242ac120002
                        vault:
                          vaultID: 419f3483a26c4c0f42c24bb78a1d1c92
                        tradeStatus: EXECUTED
                        tradingPair: ETH-USD
                        fee: '0.01'
                        feeCurrency: USD
                    page:
                      next: '/v2/trading/settlements/c8e2fcb6-78fa-4b8a-8f6d-e3ff23093dd0/trades?endDate=2020-08-31T22:14:07Z&limit=2'
              schema:
                $ref: '#/components/schemas/TradesBySettlementResponse'
        '400':
          description: Bad Request
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorDetails'
        '401':
          description: Unauthenticated
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorDetails'
        '403':
          description: Forbidden
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorDetails'
        '404':
          description: Not Found
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorDetails'
        '429':
          description: Too Many Requests
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorDetails'
        '500':
          description: Internal Server Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorDetails'
      tags:
        - Trading
      x-security:
        Execute trades: present
        Read trade activity: present
  /trading/accounts:
    get:
      operationId: getTradingAccounts
      summary: List trading accounts
      description: |-
        Permissions required: **Read trade activity**

        Get the list of trading accounts
      parameters: []
      responses:
        '200':
          description: Successfully returned the list of trading accounts
          content:
            application/json:
              examples:
                response:
                  value:
                    data:
                      - id: 6290d9bd-494f-11ed-975e-2e567b4c0e09
                        name: Crypto Fund I LLC
                        enabled: true
                      - id: 12ff3d3a-342d-47b6-8559-c7d689fd1ea0
                        name: Crypto Fund II LLC
                        enabled: true
              schema:
                $ref: '#/components/schemas/TradingAccountsResponse'
        '400':
          description: Bad Request
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorDetails'
        '401':
          description: Unauthenticated
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorDetails'
        '403':
          description: Forbidden
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorDetails'
        '429':
          description: Too Many Requests
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorDetails'
        '500':
          description: Internal Server Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorDetails'
      tags:
        - Trading
      x-security:
        Read trade activity: present
  '/trading/accounts/{accountId}':
    get:
      operationId: getTradingAccount
      summary: Get a trading account by id
      description: |-
        Permissions required: **Read trade activity**

        Get trading account details by ID.
      parameters:
        - name: accountId
          in: path
          description: The ID of the trading account to get details for
          required: true
          schema:
            type: string
      responses:
        '200':
          description: Successfully returned the trading account.
          content:
            application/json:
              examples:
                response:
                  value:
                    data:
                      id: 6290d9bd-494f-11ed-975e-2e567b4c0e09
                      name: Crypto Fund LLC
                      enabled: true
              schema:
                $ref: '#/components/schemas/TradingAccountResponse'
        '400':
          description: Bad Request
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorDetails'
        '401':
          description: Unauthenticated
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorDetails'
        '403':
          description: Forbidden
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorDetails'
        '404':
          description: Not Found
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorDetails'
        '429':
          description: Too Many Requests
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorDetails'
        '500':
          description: Internal Server Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorDetails'
      tags:
        - Trading
      x-security:
        Read trade activity: present
  '/trading/accounts/{accountId}/balances':
    get:
      operationId: getTradingAccountBalance
      summary: List trading account balances
      description: |-
        Permissions required: **Read trade activity**

        Get the trading account balances of fiat and digital assets
      parameters:
        - name: accountId
          in: path
          description: The ID of the trading account to get the balances for
          required: true
          schema:
            type: string
        - name: assetType
          in: query
          description: The asset type to display balance for
          schema:
            type: string
      responses:
        '200':
          description: Successfully returned the balances of the trading account
          content:
            application/json:
              examples:
                response:
                  value:
                    data:
                      - balance:
                          quantity: '250000.00'
                          assetType: USD
                          currentPrice: '1.00'
                          currentUSDValue: '250000.00'
                      - balance:
                          quantity: '10000.00000000'
                          assetType: USDC
                          currentPrice: '1.00'
                          currentUSDValue: '10000.00'
                      - balance:
                          quantity: '9.00000000'
                          assetType: BTC
                          currentPrice: '10000.00'
                          currentUSDValue: '90000.00'
              schema:
                $ref: '#/components/schemas/TradingAccountBalanceResponse'
        '400':
          description: Bad Request
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorDetails'
        '401':
          description: Unauthenticated
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorDetails'
        '403':
          description: Forbidden
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorDetails'
        '404':
          description: Not Found
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorDetails'
        '429':
          description: Too Many Requests
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorDetails'
        '500':
          description: Internal Server Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorDetails'
      tags:
        - Trading
      x-security:
        Read trade activity: present
  '/trading/accounts/{accountId}/credit':
    get:
      operationId: getTradingAccountCredit
      summary: Get trading account credit limit and usage
      description: |-
        Permissions required: **Read trade activity**

        Get the credit limit and usage of a trading account per asset.
        Current USD prices are not returned, only assets and their quantity.

        Still under development, return empty replies.
      parameters:
        - name: accountId
          in: path
          description: The ID of the trading account to get the credit for
          required: true
          schema:
            type: string
      responses:
        '200':
          description: Successfully returned the credit of the trading account
          content:
            application/json:
              examples:
                response:
                  value:
                    data:
                      limits:
                        - quantity: '250000.00'
                          assetType: USD
                        - quantity: '1'
                          assetType: BTC
                      usage:
                        - quantity: '5000.00'
                          assetType: USD
                        - quantity: '0.2'
                          assetType: BTC
              schema:
                $ref: '#/components/schemas/TradingAccountCreditResponse'
        '400':
          description: Bad Request
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorDetails'
        '401':
          description: Unauthenticated
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorDetails'
        '403':
          description: Forbidden
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorDetails'
        '404':
          description: Not Found
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorDetails'
        '429':
          description: Too Many Requests
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorDetails'
        '500':
          description: Internal Server Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorDetails'
      tags:
        - Trading
      x-security:
        Read trade activity: present
  /trading/marketdata:
    get:
      operationId: getMarketData
      summary: Get market data snapshot
      description: |-
        Permissions required: **Execute trades** or **Read trade activity**

        Get real-time market data snapshot for a trading symbol from the liquidity provider.
      parameters:
        - name: symbol
          in: query
          description: 'The trading pair symbol (e.g., BTC-USD, ETH-USD)'
          required: true
          schema:
            type: string
        - name: accountId
          in: query
          description: The account ID (either accountId or subaccountId must be provided)
          schema:
            type: string
        - name: subaccountId
          in: query
          description: The subaccount ID (either accountId or subaccountId must be provided)
          schema:
            type: string
        - name: sizeBuckets
          in: query
          description: 'Comma-separated list of size buckets for market depth (e.g., 0.1,0.5,1.0)'
          schema:
            type: array
            items:
              type: string
          explode: false
          style: form
        - name: amountBuckets
          in: query
          description: 'Comma-separated list of amount buckets for market depth (e.g., 1000,5000,10000). Amount buckets represent USD values. Note: When using amount buckets, the price levels in the response may show size as aggregated notional value rather than asset quantity.'
          schema:
            type: array
            items:
              type: string
          explode: false
          style: form
        - name: depth
          in: query
          description: 'Number of price levels to return for bids and offers. Must be greater than zero. The API will return up to the requested depth, limited by available liquidity in the order book. Defaults to 5 if none of depth, sizeBuckets, or amountBuckets are specified.'
          schema:
            type: integer
            format: int64
        - name: priceIncrement
          in: query
          description: Price increment for market data aggregation (decimal string for precision)
          schema:
            type: string
      responses:
        '200':
          description: Successfully retrieved market data snapshot
          content:
            application/json:
              examples:
                response:
                  value:
                    data:
                      - timestamp: '2025-05-08T16:17:01.863332Z'
                        symbol: BTC-USD
                        spread: '0.001'
                        sizeBuckets:
                          - '1'
                          - '5'
                          - '10'
                        bids:
                          - price: '101022.85'
                            size: '1.00000000'
                          - price: '101003.14'
                            size: '5.00000000'
                          - price: '100998.21'
                            size: '10.00000000'
                        offers:
                          - price: '101253.98'
                            size: '1.00000000'
                          - price: '101253.98'
                            size: '5.00000000'
                          - price: '101253.98'
                            size: '10.00000000'
                        amountBuckets: []
              schema:
                $ref: '#/components/schemas/MarketDataResponse'
        '400':
          description: Bad Request
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorDetails'
        '401':
          description: Unauthenticated
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorDetails'
        '403':
          description: Forbidden
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorDetails'
        '429':
          description: Too Many Requests
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorDetails'
        '500':
          description: Internal Server Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorDetails'
      tags:
        - Trading
      x-security:
        Execute trades: present
        Read trade activity: present
  /trading/pairs:
    get:
      operationId: getTradePairs
      summary: List supported trading pairs
      description: |-
        Permissions required: **Execute trades** or **Read trade activity**

        List all of the supported trading pairs for your organization.
        Each trading pair object includes a description and trading
        symbol (ex. BTC-USD), which usually corresponds to two asset ticker symbols.
        Optionally, a trading pair object includes a reference data object that details the trading precision context: minimum size increment and price increment.
      parameters: []
      responses:
        '200':
          description: Successfully returned trading pairs
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/TradePairsResponse'
        '400':
          description: Bad Request
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorDetails'
        '401':
          description: Unauthenticated
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorDetails'
        '403':
          description: Forbidden
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorDetails'
        '429':
          description: Too Many Requests
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorDetails'
        '500':
          description: Internal Server Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorDetails'
      tags:
        - Trading
      x-security:
        Execute trades: present
        Read trade activity: present
  /trading/async-order:
    post:
      operationId: postAsyncOrder
      summary: Place an async order
      description: |-
        Permissions required: **Execute trades**

        Place an order, either Limit, StopLoss, StopLimit or TakeProfitLimit currently FillOrKill, ImediateOrCancel or GoodTillCancel are supported.

        One of `accountId` or `subaccountId` must be specified but not both.
      parameters: []
      requestBody:
        description: Parameters to place an order.
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/NewAsyncOrder'
      responses:
        '201':
          description: Successfully placed an ansyc order
          content:
            application/json:
              examples:
                response:
                  value:
                    data:
                      clOrderId: 6fb5fc79-0bb4-446d-82dd-d4687fb56a02
                      orderId: a94c8d75-6c9d-4903-95f3-5b0893e76cb7
                      subaccountId: 9236041d-f69d-4cb9-a747-684a288cec81
                      symbol: BTC-USD
                      side: BUY
                      currency: USD
                      counterCurrency: BTC
                      orderQty: '10000.00'
                      orderType: STOP_LIMIT
                      timeInForce: GTC
                      orderStatus: PENDING_NEW
                      execId: 58fd5afc-b85e-45d1-951e-d6429ea9cd54
                      execType: PENDING_NEW
                      avgPx: '21990.01'
                      avgPxAllIn: '21968.02'
                      cumQty: '10000'
                      counterQty: '0.45475'
                      counterQtyAllIn: '0.45430'
                      fillPx: '21990.01'
                      fillQty: '10000'
                      leavesQty: '0'
                      cancelQty: '0'
                      fee: '0.00045521'
                      feeCurrency: BTC
                      transactTime: '2023-03-12T22:22:09.925050Z'
                      submitTime: '2023-03-12T22:22:09.909251Z'
              schema:
                $ref: '#/components/schemas/AsyncOrderResponse'
        '400':
          description: Bad Request
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorDetails'
        '401':
          description: Unauthenticated
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorDetails'
        '403':
          description: Forbidden
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorDetails'
        '429':
          description: Too Many Requests
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorDetails'
        '500':
          description: Internal Server Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorDetails'
        '503':
          description: Service Unavailable
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorDetails'
      tags:
        - Trading
      x-security:
        Execute trades: present
  /trading/async-order/cancel:
    post:
      operationId: cancelAsyncOrder
      summary: Cancel an async order
      description: |-
        Permissions required: **Execute trades**

        Cancels an async order.
      parameters:
        - name: orderId
          in: query
          description: The orderId for the async order to cancel
          required: false
          schema:
            type: string
        - name: clOrderId
          in: query
          description: The clOrderId for the async order to cancel
          required: false
          schema:
            type: string
      responses:
        '200':
          description: Successfully cancel an ansyc order
          content:
            application/json:
              examples:
                response:
                  value:
                    data:
                      orderId: c6d8c4a8-e883-4ae3-9f35-4a35d06c383d
                      clOrderId: 40d846b7-6efb-48fa-acc9-dcace827c927
                      subaccountId: a05a846f-4ef0-11ed-a291-dafe71b41c83
                      symbol: BTC-USD
                      side: BUY
                      orderQty: '1.0'
                      currency: BTC
                      counterCurrency: USD
                      orderType: STOP_LIMIT
                      limitPrice: '22840.9299'
                      timeInForce: GTC
                      orderStatus: PENDING_CANCEL
                      avgPx: '22840.9299'
                      avgPxAllIn: '22863.7708299'
                      leavesQty: '0.0'
                      cancelQty: '0.0'
                      cumQty: '1.0'
                      counterQty: '22840.9299'
                      counterQtyAllIn: '22866.2799'
                      totalFee: '25.35'
                      feeCurrency: USD
                      submitTime: '2023-03-07T19:49:06.286737Z'
                      transactTime: '2023-03-07T19:49:06.314322Z'
              schema:
                $ref: '#/components/schemas/AsyncOrderResponse'
        '400':
          description: Bad Request
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorDetails'
        '401':
          description: Unauthenticated
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorDetails'
        '403':
          description: Forbidden
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorDetails'
        '404':
          description: Not Found
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorDetails'
        '429':
          description: Too Many Requests
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorDetails'
        '500':
          description: Internal Server Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorDetails'
        '503':
          description: Service Unavailable
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorDetails'
      tags:
        - Trading
      x-security:
        Execute trades: present
  /trusted_destinations:
    get:
      operationId: getTrustedDestinations
      summary: List trusted destinations
      description: |-
        Permissions required: **Read vault activity**


        List trusted destinations
      parameters:
        - name: afterId
          in: query
          description: When paginating this is used to provide the starting point for the page to fetch (retrieved from the previous response body)
          schema:
            type: string
        - name: limit
          in: query
          description: Maximum number of results to return per query
          schema:
            type: integer
            format: int64
            default: 25
            maximum: 100
            minimum: 1
        - name: ownerType
          in: query
          description: The type of the owner (currently only CUSTOMER is supported)
          schema:
            type: string
            enum:
              - CUSTOMER
          example: CUSTOMER
        - name: ownerId
          in: query
          description: 'The ID of the owner (for CUSTOMER type, this is the customerId)'
          schema:
            type: string
        - name: assetTypeId
          in: query
          description: 'Asset type identifier. This will return Trusted Destinations with a matching assetTypeId, as well as Trusted Destinations with a matching networkId if network level is true.'
          schema:
            type: string
      responses:
        '200':
          description: List of trusted destinations
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/TrustedDestinationsResponse'
        '401':
          description: Unauthenticated
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorDetails'
        '403':
          description: Forbidden
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorDetails'
        '429':
          description: Too Many Requests
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorDetails'
        '500':
          description: Internal Server Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorDetails'
      tags:
        - Trusted Destinations
    post:
      operationId: createTrustedDestinations
      summary: Create new Trusted Destinations
      description: |-
        Permissions required: **Manage Trusted Destinations**


        Create new Trusted Destinations
      parameters: []
      requestBody:
        description: Create Trusted Destinations request
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/CreateTrustedDestinationsRequest'
      responses:
        '200':
          description: Successfully started creation of Trusted Destinations
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/CreateTrustedDestinationsResponse'
        '400':
          description: Bad Request
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorDetails'
        '401':
          description: Unauthenticated
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorDetails'
        '403':
          description: Forbidden
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorDetails'
        '429':
          description: Too Many Requests
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorDetails'
        '500':
          description: Internal Server Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorDetails'
      tags:
        - Trusted Destinations
  '/trusted_destinations/{creationRequestId}/status':
    get:
      operationId: getCreateTDWorkflowStatus
      summary: Check status of Trusted Destinations
      description: |-
        Permissions required: **Read vault activity**


        Check status of Trusted Destinations
      parameters:
        - name: creationRequestId
          in: path
          description: Idempotent ID provided in the Create Trusted Destination request
          required: true
          schema:
            type: string
      responses:
        '200':
          description: Status of the operation identified by the provided idempotentId
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/TrustedDestinationStatusResponse'
        '400':
          description: Bad Request
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorDetails'
        '401':
          description: Unauthenticated
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorDetails'
        '403':
          description: Forbidden
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorDetails'
        '429':
          description: Too Many Requests
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorDetails'
        '500':
          description: Internal Server Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorDetails'
      tags:
        - Trusted Destinations
  '/trusted_destinations/{creationRequestId}/cancel':
    delete:
      operationId: cancelTrustedDestinationCreation
      summary: Cancel Trusted Destination creation
      description: |-
        Permissions required: **Manage Trusted Destinations**


        Cancel ongoing creation of Trusted Destinations
      parameters:
        - name: creationRequestId
          in: path
          description: Idempotent ID provided in the Create Trusted Destination request
          required: true
          schema:
            type: string
      responses:
        '200':
          description: Successfully initiated cancellation of Trusted Destination creation
        '400':
          description: Bad Request
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorDetails'
        '401':
          description: Unauthenticated
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorDetails'
        '403':
          description: Forbidden
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorDetails'
        '404':
          description: Not Found
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorDetails'
        '429':
          description: Too Many Requests
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorDetails'
        '500':
          description: Internal Server Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorDetails'
      tags:
        - Trusted Destinations
  '/trusted_destinations/{trustedDestinationId}':
    delete:
      operationId: deleteTrustedDestination
      summary: Delete Trusted Destination
      description: |-
        Permissions required: **Manage Trusted Destinations**


        Delete a Trusted Destination
      parameters:
        - name: trustedDestinationId
          in: path
          description: ID for the Trusted Destination to be deleted
          required: true
          schema:
            type: string
        - name: ownerType
          in: query
          description: 'Currently always `CUSTOMER`, but when other types exist this will become an enum with multiple possible values, indicating how the `id` field should be interpreted.'
          schema:
            type: string
          example: CUSTOMER
        - name: ownerId
          in: query
          description: |-
            The id of the Owner of the Trusted Destination.
            * For owner type `CUSTOMER`, this is the respective CustomerID.
          schema:
            type: string
      responses:
        '200':
          description: Successfully deleted Trusted Destination
        '400':
          description: Bad Request
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorDetails'
        '401':
          description: Unauthenticated
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorDetails'
        '403':
          description: Forbidden
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorDetails'
        '429':
          description: Too Many Requests
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorDetails'
        '500':
          description: Internal Server Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorDetails'
      tags:
        - Trusted Destinations
  '/vaults/{vaultId}/addresses':
    get:
      operationId: getAddresses
      summary: List all addresses for an asset
      description: |
        Permissions required: **Read vault activity** or **Create address**



        Get all addresses for the asset type within the specified `vaultId`.
      parameters:
        - name: vaultId
          in: path
          description: The ID of the vault containing the asset type
          required: true
          schema:
            type: string
        - name: assetType
          in: query
          description: The asset type to display addresses for
          required: true
          schema:
            type: string
        - name: afterId
          in: query
          description: When paginating this is used to provide the starting point for the page to fetch (retrieved from the previous response body)
          schema:
            type: string
        - name: limit
          in: query
          description: Maximum number of results to return per query
          schema:
            type: integer
            format: int64
            default: 25
            maximum: 100
            minimum: 1
      responses:
        '200':
          description: List of signed addresses for this asset
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/VaultsAddressesResponse'
        '400':
          description: Bad Request
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorDetails'
        '401':
          description: Unauthenticated
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorDetails'
        '403':
          description: Forbidden
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorDetails'
        '404':
          description: Not Found
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorDetails'
        '429':
          description: Too Many Requests
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorDetails'
        '500':
          description: Internal Server Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorDetails'
      tags:
        - Addresses
      x-security:
        Read vault activity: checkSourceVault
        Create address: checkSourceVault
  '/vaults/{vaultId}/wallets':
    get:
      operationId: getVaultWallets
      summary: List all wallets for a vault
      description: |
        Permissions required: **Read vault activity**



        Get all wallets for the specified `vaultId`.
      parameters:
        - name: vaultId
          in: path
          description: The ID of the vault containing the wallets
          required: true
          schema:
            type: string
        - name: afterId
          in: query
          description: When paginating this is used to provide the starting point for the page to fetch (retrieved from the previous response body)
          schema:
            type: string
        - name: networkId
          in: query
          description: 'If set, only wallets for this Network ID will be returned'
          schema:
            type: string
        - name: assetType
          in: query
          description: 'If set, only wallets for this Asset Type ID will be returned'
          schema:
            type: string
        - name: limit
          in: query
          description: Maximum number of results to return per query
          schema:
            type: integer
            format: int64
            default: 25
            maximum: 100
            minimum: 1
        - name: filterByIsArchived
          in: query
          description: 'Filter by the whether a wallet is archived. If true, then only archived wallets will be returned. If false, then only not-archived wallets are returned. If not specified, then all wallets are returned.'
          schema:
            type: boolean
      responses:
        '200':
          description: List of wallets for this vault
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/VaultsWalletsResponse'
        '400':
          description: Bad Request
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorDetails'
        '401':
          description: Unauthenticated
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorDetails'
        '403':
          description: Forbidden
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorDetails'
        '404':
          description: Not Found
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorDetails'
        '429':
          description: Too Many Requests
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorDetails'
        '500':
          description: Internal Server Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorDetails'
      tags:
        - Wallets
      x-security:
        Read vault activity: checkSourceVault
    post:
      operationId: createVaultWallet
      summary: Create a new wallet in a vault
      description: |
        Permissions required: **Create address**



        Create a wallet in the specified `vaultId`.
      parameters:
        - name: vaultId
          in: path
          description: The ID of the vault holding the new wallet
          required: true
          schema:
            type: string
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/VaultsWalletsRequest'
      responses:
        '200':
          description: The new wallet info in this vault
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/VaultsWalletResponse'
        '400':
          description: Bad Request
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorDetails'
        '401':
          description: Unauthenticated
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorDetails'
        '403':
          description: Forbidden
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorDetails'
        '404':
          description: Not Found
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorDetails'
        '429':
          description: Too Many Requests
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorDetails'
        '500':
          description: Internal Server Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorDetails'
      tags:
        - Wallets
      x-security:
        Create address: checkSourceVault
  /vesting/balances:
    post:
      operationId: getVestingBalancesBatch
      summary: Get vesting balances for multiple allocations
      description: |
        Get vesting balances for multiple allocation IDs in a single request. Returns per-allocation results with balance breakdowns including available, unvested, and locked amounts. Individual allocation errors are returned inline rather than failing the entire batch.
      parameters: []
      requestBody:
        description: The request body containing allocation IDs and optional stakeholder ID
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/GetVestingBalancesBatchRequest'
      responses:
        '200':
          description: Batch vesting balances for the requested allocations
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/VestingBalancesBatchResponse'
        '400':
          description: Bad Request
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorDetails'
        '401':
          description: Unauthenticated
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorDetails'
        '403':
          description: Forbidden
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorDetails'
        '429':
          description: Too Many Requests
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorDetails'
        '500':
          description: Internal Server Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorDetails'
      tags:
        - Vesting
      x-security:
        Read vault activity: present
  '/vesting/balances/{allocationId}':
    get:
      operationId: getVestingBalances
      summary: Get vesting balances for an allocation
      description: |
        Get vesting balances for a specific allocation ID. Returns the current balance breakdown including available, unvested, and locked amounts.
      parameters:
        - name: allocationId
          in: path
          description: The ID of the allocation to get vesting balances for
          required: true
          schema:
            type: string
        - name: stakeholderId
          in: query
          description: 'The external stakeholder ID (optional, used to retrieve wallet info when no transactions exist yet)'
          required: false
          schema:
            type: string
      responses:
        '200':
          description: Vesting balances for the specified allocation
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/VestingBalancesResponse'
        '400':
          description: Bad Request
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorDetails'
        '401':
          description: Unauthenticated
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorDetails'
        '403':
          description: Forbidden
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorDetails'
        '404':
          description: Not Found
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorDetails'
        '429':
          description: Too Many Requests
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorDetails'
        '500':
          description: Internal Server Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorDetails'
      tags:
        - Vesting
      x-security:
        Read vault activity: present
  /tags:
    get:
      operationId: listTags
      summary: List tags
      description: 'List tags filtered by ownership type and/or entity. When entityId is provided, returns tags applied to that entity. When type is provided, filters tag definitions by ownership type.'
      parameters:
        - name: tagType
          in: query
          description: 'Filter tags by a single ownership type (system, backoffice, client)'
          required: false
          schema:
            type: string
            enum:
              - system
              - backoffice
              - client
        - name: entityId
          in: query
          description: Return tags applied to this entity ID
          required: false
          schema:
            type: string
        - name: tagTypes
          in: query
          description: 'Comma-separated list of ownership types for multi-type filtering (e.g. backoffice,system). Takes precedence over tagType when set.'
          required: false
          schema:
            type: string
        - name: afterId
          in: query
          description: When paginating this is used to provide the starting point for the page to fetch (retrieved from the previous response body)
          required: false
          schema:
            type: string
        - name: limit
          in: query
          description: 'Number of results to return when listing by type (default: 25, max: 100)'
          required: false
          schema:
            type: integer
            default: 25
            maximum: 100
            minimum: 1
        - name: sort
          in: query
          description: Field to sort by when listing by type
          required: false
          schema:
            type: string
            default: NAME
            enum:
              - NAME
              - CREATED_AT
        - name: order
          in: query
          description: Sort direction when listing by type
          required: false
          schema:
            type: string
            default: ASC
            enum:
              - ASC
              - DESC
      responses:
        '200':
          description: List of tags matching the filters
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ListTagsResponse'
        '400':
          description: Bad Request
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorDetails'
        '401':
          description: Unauthenticated
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorDetails'
        '403':
          description: Forbidden
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorDetails'
        '429':
          description: Too Many Requests
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorDetails'
        '500':
          description: Internal Server Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorDetails'
      tags:
        - Tagging
      x-hidden: true
      x-mint:
        href: api-reference/v2/tags/list-tags
      x-security:
        Read vault activity: present
    post:
      operationId: createTag
      summary: Create a tag
      description: 'Create a new tag. Tags are also auto-created on first use via POST /v2/tags/apply, so explicit creation is optional.'
      parameters: []
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/CreateTagRequest'
      responses:
        '201':
          description: Tag created successfully
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/CreateTagResponse'
        '400':
          description: Bad Request
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorDetails'
        '401':
          description: Unauthenticated
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorDetails'
        '403':
          description: Forbidden
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorDetails'
        '409':
          description: Conflict - tag already exists
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorDetails'
        '429':
          description: Too Many Requests
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorDetails'
        '500':
          description: Internal Server Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorDetails'
      tags:
        - Tagging
      x-hidden: true
      x-mint:
        href: api-reference/v2/tags/create-a-tag
      x-security:
        Manage tags: present
  /tags/apply:
    post:
      operationId: applyTags
      summary: Apply tags to an entity
      description: 'Apply a set of tags to an entity, replacing the entity''s existing tags of the given tag type. Tags are auto-created if they do not exist, and an empty list clears the entity''s tags of that type.'
      parameters: []
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/ApplyTagsRequest'
      responses:
        '200':
          description: Tags applied successfully
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ApplyTagsResponse'
        '400':
          description: Bad Request
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorDetails'
        '401':
          description: Unauthenticated
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorDetails'
        '403':
          description: Forbidden
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorDetails'
        '429':
          description: Too Many Requests
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorDetails'
        '500':
          description: Internal Server Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorDetails'
      tags:
        - Tagging
      x-hidden: true
      x-mint:
        href: api-reference/v2/tags/apply-tags-to-an-entity
      x-security:
        Manage tags: present
  '/tags/apply/{entityId}/{tagName}':
    delete:
      operationId: deleteAppliedTag
      summary: Remove a tag from an entity
      description: Remove a specific tag from an entity. Tag name matching is case-insensitive.
      parameters:
        - name: entityId
          in: path
          description: The entity ID to remove the tag from
          required: true
          schema:
            type: string
        - name: tagName
          in: path
          description: The name of the tag to remove (case-insensitive)
          required: true
          schema:
            type: string
      responses:
        '200':
          description: Tag removed successfully
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/DeleteAppliedTagResponse'
        '400':
          description: Bad Request
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorDetails'
        '401':
          description: Unauthenticated
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorDetails'
        '403':
          description: Forbidden
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorDetails'
        '404':
          description: Not Found - tag not applied to this entity
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorDetails'
        '429':
          description: Too Many Requests
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorDetails'
        '500':
          description: Internal Server Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorDetails'
      tags:
        - Tagging
      x-hidden: true
      x-mint:
        href: api-reference/v2/tags/remove-a-tag-from-an-entity
      x-security:
        Manage tags: present
  /tags/search:
    get:
      operationId: searchTags
      summary: Search entities by tag
      description: Search for entities that have specific tags applied. Supports cursor-based pagination.
      parameters:
        - name: name
          in: query
          description: Comma-separated list of tag names to search by
          required: true
          schema:
            type: string
        - name: type
          in: query
          description: 'Filter results by entity type (e.g. withdrawal, transfer)'
          required: false
          schema:
            type: string
        - name: afterId
          in: query
          description: When paginating this is used to provide the starting point for the page to fetch (retrieved from the previous response body)
          required: false
          schema:
            type: string
        - name: limit
          in: query
          description: Maximum number of results to return per query
          required: false
          schema:
            type: integer
            default: 20
            maximum: 100
            minimum: 1
      responses:
        '200':
          description: Entities matching the tag search
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/SearchTagsResponse'
        '400':
          description: Bad Request
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorDetails'
        '401':
          description: Unauthenticated
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorDetails'
        '403':
          description: Forbidden
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorDetails'
        '429':
          description: Too Many Requests
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorDetails'
        '500':
          description: Internal Server Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorDetails'
      tags:
        - Tagging
      x-hidden: true
      x-mint:
        href: api-reference/v2/tags/search-entities-by-tag
      x-security:
        Read vault activity: present
  /wallets:
    get:
      operationId: getWallets
      summary: List all wallets for all vaults
      description: |
        Permissions required: **Read vault activity**



        List wallet metadata for the current user.
      parameters:
        - name: afterId
          in: query
          description: When paginating this is used to provide the starting point for the page to fetch (retrieved from the previous response body)
          schema:
            type: string
        - name: subaccountIds
          in: query
          description: 'If subaccountIds filter is present, only wallets linked to those subaccountIds will be returned.'
          schema:
            type: array
            items:
              type: string
            uniqueItems: true
          explode: false
          style: form
        - name: networkId
          in: query
          description: 'If set, only wallets for this Network ID will be returned'
          schema:
            type: string
        - name: assetType
          in: query
          description: 'If set, only wallets for this Asset Type ID will be returned'
          schema:
            type: string
        - name: limit
          in: query
          description: Maximum number of results to return per query
          schema:
            type: integer
            format: int64
            default: 25
            maximum: 100
            minimum: 1
        - name: filterByIsArchived
          in: query
          description: 'Filter by the whether a wallet is archived. If true, then only archived wallets will be returned. If false, then only not-archived wallets are returned. If not specified, then all wallets are returned.'
          schema:
            type: boolean
        - name: searchByAddress
          in: query
          description: Search wallets based on addresses in this wallet. The search length should be at least 3 characters.
          schema:
            type: string
            minLength: 3
      responses:
        '200':
          description: List of wallets for this vault
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/WalletsResponse'
        '400':
          description: Bad Request
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorDetails'
        '401':
          description: Unauthenticated
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorDetails'
        '403':
          description: Forbidden
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorDetails'
        '404':
          description: Not Found
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorDetails'
        '429':
          description: Too Many Requests
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorDetails'
        '500':
          description: Internal Server Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorDetails'
      tags:
        - Wallets
      x-security:
        Read vault activity: present
  '/wallets/{walletId}':
    get:
      operationId: getWallet
      summary: Wallet details for a wallet
      description: |
        Permissions required: **Read vault activity**



        Get wallet details for the specified `walletId`.
      parameters:
        - name: walletId
          in: path
          description: An ID uniquely identifying an Anchorage Digital wallet
          required: true
          schema:
            type: string
        - name: filterByIsArchived
          in: query
          description: 'Filter by the whether a wallet is archived. If true, then only archived wallets will be returned. If false, then only not-archived wallets are returned. If  not specified, all wallets are returned.'
          schema:
            type: boolean
      responses:
        '200':
          description: Wallet info for the specified wallet
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/VaultsWalletResponse'
        '400':
          description: Bad Request
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorDetails'
        '401':
          description: Unauthenticated
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorDetails'
        '403':
          description: Forbidden
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorDetails'
        '404':
          description: Not Found
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorDetails'
        '429':
          description: Too Many Requests
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorDetails'
        '500':
          description: Internal Server Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorDetails'
      tags:
        - Wallets
      x-security:
        Read vault activity: checkSourceVault
  '/wallets/{walletId}/activate':
    post:
      operationId: activateWallet
      summary: Activate an existing wallet on additional networks
      description: |
        Permissions required: **Create address**


        Activate the existing wallet identified by `walletId` on additional networks that share the same cryptographic key derivation (e.g. EVM-compatible chains). Each entry in `compatibleNetworkIds` produces a new wallet on that network with the same address as the source.

        Per-network failures are reported individually in the response without aborting the whole call: a target network that is not key-compatible with the source wallet's network, or that the organization has not enabled, returns a `FAILED` status for that entry while other entries continue.
      parameters:
        - name: walletId
          in: path
          description: An ID uniquely identifying an Anchorage Digital wallet
          required: true
          schema:
            type: string
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/ActivateWalletRequest'
      responses:
        '200':
          description: Per-network activation results
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ActivateWalletResponse'
        '400':
          description: Bad Request
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorDetails'
        '401':
          description: Unauthenticated
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorDetails'
        '403':
          description: Forbidden
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorDetails'
        '404':
          description: Not Found
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorDetails'
        '429':
          description: Too Many Requests
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorDetails'
        '500':
          description: Internal Server Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorDetails'
      tags:
        - Wallets
      x-security:
        Create address: checkSourceVault
  '/wallets/{walletId}/addresses':
    post:
      operationId: provisionWalletAddress
      summary: Provision a deposit address for a wallet
      description: |
        Permissions required: **Create address**




        This endpoint allows you to request an asynchronous provision of a signed deposit address for a given wallet. For UTXO-based wallets a new address will always be provisioned upon request. For account-based wallets only one address may be provisioned per wallet and subsequent attempts will return the previously provisioned address.


        Newly requested addresses may not be available for several minutes once requested.
      parameters:
        - name: walletId
          in: path
          description: An ID uniquely identifying an Anchorage Digital wallet
          required: true
          schema:
            type: string
      responses:
        '200':
          description: Provisioned address
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/WalletsAddressesResponse'
        '400':
          description: Bad Request
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorDetails'
        '401':
          description: Unauthenticated
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorDetails'
        '403':
          description: Forbidden
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorDetails'
        '404':
          description: Not Found
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorDetails'
        '422':
          description: Provision address in progress
          content:
            application/json:
              examples:
                response:
                  value:
                    errorType: UnprocessableEntity
                    message: An address for this wallet is being created and is not yet available. Please try again in 5 minutes.
              schema:
                $ref: '#/components/schemas/ErrorDetails'
        '429':
          description: Too Many Requests
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorDetails'
        '500':
          description: Internal Server Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorDetails'
      tags:
        - Addresses
      x-security:
        Create address: checkSourceVault
  /transactions/withdrawal:
    post:
      operationId: createWithdrawal
      summary: Create a withdrawal request
      description: |
        Permissions required: **Initiate withdrawals**



        #### Identify the sending asset


        To initiate a withdrawal from a wallet to an external destination, you must identify which asset you'd like to withdraw funds from. Provide a `source` (with `id` and `type`).


        #### Identify the receiving resource


        Choose a resource to receive the funds as the `destination`. This resource may belong to your organization (wallet) or another organization (address, standing instruction).


        #### Permissions


        The provided API key must be associated with a [permission group](#section/Authentication-and-Security/Permission-Groups) that has Initiate withdrawals permission for the sending vault.


        #### Additional Metadata


        You may provide a `description` with each withdrawal, that will be visible within your organization in the Anchorage Digital iOS Application.


        #### Successful Withdrawals


        If the withdrawal request is valid, the request will initiate a withdrawal transaction from the sending wallet. This is a common withdrawal that, unlike Transfers, will still require a quorum of approvals on the Anchorage Digital iOS app and will undergo manual Anchorage Digital Risk Review. Like other transactions, these withdrawals will be visible on the Anchorage Digital iOS Application, the Web Dashboard, and in the [list transactions](#operation/getTransactions) API endpoint.


        #### Unsuccessful Withdrawals


        A withdrawal request may fail for any of the following reasons:

          - An ongoing withdrawal already exists (unlike transfers, withdrawal requests are not queued)
          - The specified asset does not exist
          - The specified amount exceeds the available funds for this asset (insufficient funds)
          - The destination address is invalid
          - The provided API key does not have permissions to initiate withdrawals from this wallet

        If the initiated withdrawal is approved by the quorum, the transaction may fail for any of the following reasons:

          - There are insufficient funds to pay the blockchain network fee at the time of this transaction
          - There is a failure on the blockchain
      parameters:
        - name: Api-Signature
          in: header
          description: |
            A hex-encoded Ed25519 signature of `timestamp_epoch_seconds + uppercase(http_method) + request_path + request_body`.



            Construction example:

              ```
              toHex(
                ed25519Sign(
                  signing_key,
                  '{}{}{}{}'.format(timestamp_epoch_seconds, toUpper(httpMethod), httpRequestPath, httpBody)
                )
              )
              ```
          required: true
          schema:
            type: string
            pattern: '^[0-9A-Fa-f]{128,160}$'
        - name: Api-Timestamp
          in: header
          description: 'Current timestamp, represented as unix epoch seconds'
          required: true
          schema:
            type: integer
            format: int64
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/WithdrawalRequest'
      responses:
        '201':
          description: Successfully initiated a withdrawal
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/WithdrawalResponse'
        '400':
          description: Bad Request
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorDetails'
        '401':
          description: Unauthenticated
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorDetails'
        '403':
          description: Forbidden
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorDetails'
        '404':
          description: Not Found
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorDetails'
        '409':
          description: Conflict
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorDetails'
        '429':
          description: Too Many Requests
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorDetails'
        '500':
          description: Internal Server Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorDetails'
      tags:
        - Transactions
      x-security:
        Initiate withdrawals: checkSourceVault
  /transfers:
    get:
      operationId: getTransfers
      summary: List transfers
      description: |
        Permissions required: **Transfer funds**




        List all transfers created by your API key.



        **Filters**



        You may optionally supply the following filters:


          - Set a date range by providing the `startDate` and/or `endDate` query parameters. If the date parameters are omitted, all transfers will be returned.
          - Specify a specific vault to return transfers for by specifying the `vaultId` parameter. If the `vaultId` parameter is omitted, transfers originating from all vaults will be returned. Providing both `vaultId` and `walletId` filters will result in an error.
          - Specify a specific wallet to return transfers for by specifying the `walletId` parameter. If the `walletId` parameter is omitted, transfers originating from all vaults and wallets will be returned. Providing both `vaultId` and `walletId` filters will result in an error.
          - Filter transfers of one or more statuses with the `statuses` parameter. Multiple statuses should be separated by commas.


        **Multiple Transfers**



        To fetch a specific batch of transfers, pass a comma-separated list of `transferIds` as the `transferIds` query parameter.
      parameters:
        - name: vaultId
          in: query
          description: 'The ID of a vault. If provided, only transfers originating from this vault will be returned.'
          schema:
            type: string
        - name: walletId
          in: query
          description: 'The ID of a wallet. If provided, only transfers originating from this wallet will be returned.'
          schema:
            type: string
        - name: transferIds
          in: query
          description: A list of `transferIds` to return. Invalid `transferIds` will be ignored.
          schema:
            type: array
            items:
              type: string
          explode: false
          style: form
        - name: startDate
          in: query
          description: 'The start date (inclusive) in `YYYY-MM-DD` format. The earliest valid start date is ''2017-01-01`. Dates are always in UTC [RFC 3339](https://datatracker.ietf.org/doc/html/rfc3339#section-5.6) ''full-date''.'
          schema:
            type: string
            format: date
        - name: endDate
          in: query
          description: 'The end date (inclusive) in `YYYY-MM-DD` format. The latest valid end date is the current date. Dates are always in UTC [RFC 3339](https://datatracker.ietf.org/doc/html/rfc3339#section-5.6) ''full-date''.'
          schema:
            type: string
            format: date
        - name: afterId
          in: query
          description: When paginating this is used to provide the starting point for the page to fetch (retrieved from the previous response body)
          schema:
            type: string
        - name: limit
          in: query
          description: Maximum number of results to return per query
          schema:
            type: integer
            format: int64
            default: 100
            maximum: 100
            minimum: 1
        - name: statuses
          in: query
          description: One or more transfer statuses to filter results
          schema:
            type: array
            items:
              type: string
              enum:
                - IN_PROGRESS
                - COMPLETED
                - FAILED
                - QUEUED
            uniqueItems: true
          explode: false
          style: form
      responses:
        '200':
          description: A list of transfers.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/TransfersResponse'
        '400':
          description: Bad Request
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorDetails'
        '401':
          description: Unauthenticated
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorDetails'
        '403':
          description: Forbidden
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorDetails'
        '404':
          description: Not Found
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorDetails'
        '429':
          description: Too Many Requests
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorDetails'
        '500':
          description: Internal Server Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorDetails'
      tags:
        - Transfers
      x-security:
        Transfer funds: present
    post:
      operationId: createTransfer
      summary: Create a transfer request
      description: |+
        Permissions required: **Transfer funds**




        #### Identify the sending resource and asset


        To initiate a transfer between resources, you must identify which resource you'd like to transfer funds from and the asset type to transfer. Provide a `source` and `assetType`.


        #### Identify the receiving resource


        Choose a resource to receive the funds as the `destination`. This resource may belong to your organization or another organization that also custodies with Anchorage Digital, or it may also be an approved blockchain address not custodied by Anchorage Digital (see [Permission Groups](#section/Authentication-and-Security/Permission-Groups) for more details). Please note: If you would like to use the Anchorage Digital API to transfer to approved blockchain addresses, please contact [api@anchorage.com](mailto:api@anchorage.com).


        #### Permissions


        The provided API key must be associated with a permission group that has Transfer permissions for the vault from which the assets are being sent. The receiving resource does not need Transfer permissions to receive a transfer of funds.


        #### Additional Metadata


        You may provide a transfer memo with each transfer. If the transfer API request is successful, a transfer transaction will be created that will include this transfer memo in the description. The resulting deposit will also include this memo.



        #### Successful Transfers


        If the transfer request is valid, the request will initiate a transfer transaction from the source. This is a special withdrawal that will not require a quorum of approvals and will undergo automated Anchorage Digital Risk Review. When the transaction is broadcasted and confirmed on the blockchain, a subsequent deposit will be detected for the destination. All of these transactions will be visible on the Anchorage Digital iOS Application, the Web Dashboard, and in the [list transactions](#operation/getTransactions) API endpoint.


        #### Unsuccessful Transfers


        A transfer request may fail for any of the following reasons:

          - The specified sending resource does not exist or does not support the specified asset type
          - The specified amount exceeds the available funds for this asset (insufficient funds)
          - The destination does not exist or does not support the specified asset type
          - The provided API key does not have permissions to initiate transfers from this wallet


        If the transfer request is successful, the actual transfer transaction may fail for any of the following reasons:

          - There are insufficient funds to pay the blockchain network fee at the time of this transaction
          - The transfer was successfully queued but there were insufficient funds by the time it was processed
          - There is a failure on the blockchain

        #### Idempotent Requests


        This endpoint supports [idempotent requests](#section/Idempotency) so that a transfer does not occur twice if an API call was interrupted and must be retried. To send an idempotent request, include the `idempotentId` field in the body of the POST request.


        #### Queueing


        Transfer requests are queued and processed in the order they were received. When transferring between wallets, multiple transfer requests may be queued for the same asset in a given wallet, but only one will be processed at a time. The other requests will remain in the `QUEUED` state until the prior transfer is completed or fails.


        #### Transferring Full Balance


        For assets with network fees paid in a separate asset type, transferring the full balance of an asset is no different than transferring any other amount for that asset.


        For assets with network fees paid in the same asset type, transferring the full balance is not possible without specifying to the server that the fee should be deducted from the transfer amount. See the `deductFeeFromAmountIfSameType` flag of the `TransfersRequest` model for more detail.

      parameters:
        - name: Api-Signature
          in: header
          description: |
            A hex-encoded Ed25519 signature of `timestamp_epoch_seconds + uppercase(http_method) + request_path + request_body`.
            The `Api-Child-Control-Key` header is NOT part of the signed payload: it carries key material used only to sign the transaction, not an authorization parameter, so it is excluded from the signature and never persisted with the operation.



            Construction example:

              ```
              toHex(
                ed25519Sign(
                  signing_key,
                  '{}{}{}{}'.format(timestamp_epoch_seconds, toUpper(httpMethod), httpRequestPath, httpBody)
                )
              )
              ```
          required: true
          schema:
            type: string
            pattern: '^[0-9A-Fa-f]{128,160}$'
        - name: Api-Timestamp
          in: header
          description: 'Current timestamp, represented as unix epoch seconds'
          required: true
          schema:
            type: integer
            format: int64
        - name: Api-Child-Control-Key
          in: header
          description: |
            The hex-encoded child control key of the source wallet, derived client-side from the organization's Master Control Key.

            Required when the source wallet's private keys are control-key-encrypted (self-custody organizations). For other wallets a supplied value is not used to sign anything, but a malformed value is still rejected with InvalidControlKeyFormat regardless of wallet type. It is passed as a header, is NOT part of the signed request payload, is used only to sign the transaction, and is never persisted with the operation.
          required: false
          schema:
            type: string
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/TransfersRequest'
      responses:
        '201':
          description: Successfully initiate a transfer
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/TransfersResponse1'
        '400':
          description: Bad Request or Insufficient Funds
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorDetails'
        '401':
          description: Unauthenticated
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorDetails'
        '403':
          description: Forbidden
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorDetails'
        '404':
          description: Not Found
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorDetails'
        '429':
          description: Too Many Requests
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorDetails'
        '500':
          description: Internal Server Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorDetails'
      tags:
        - Transfers
      x-security:
        Transfer funds: checkSourceVaultAndDestination
  '/transfers/{transferId}':
    get:
      operationId: getTransfer
      summary: Get transfer by ID
      description: |+
        Permissions required: **Transfer funds**




        Get transfer by ID, for transfers created by your API key.


        NOTE: price and USD value information is recent but does not reflect real-time data.

      parameters:
        - name: transferId
          in: path
          description: The ID of the transfer to get details for
          required: true
          schema:
            type: string
      responses:
        '200':
          description: Metadata about a specific transfer
          content:
            application/json:
              examples:
                response:
                  value:
                    data:
                      transferId: 008d3ec72558ce907571886df63ef51594b5bd8cf106a0b7fa8f12a30dfc867f
                      amount:
                        quantity: '1000.00000000'
                        assetType: USDC
                        currentPrice: '1.00'
                        currentUSDValue: '1000.00'
                      fee:
                        quantity: '0.0002207155625'
                        assetType: ETH
                      assetType: USDC
                      source:
                        id: 1c920f4241b78a1d483a29f3c24b6c4c
                        type: WALLET
                      destination:
                        id: 55e89d4a644d736b01533a2ea9b32a20
                        type: WALLET
                      transferMemo: 'Internal ID: #12838927347'
                      status: COMPLETED
                      createdAt: '2019-01-02T12:34:56.000Z'
                      endedAt: '2019-01-03T12:34:56.000Z'
              schema:
                $ref: '#/components/schemas/TransfersResponse2'
        '400':
          description: Bad Request
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorDetails'
        '401':
          description: Unauthenticated
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorDetails'
        '403':
          description: Forbidden
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorDetails'
        '404':
          description: Not Found
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorDetails'
        '429':
          description: Too Many Requests
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorDetails'
        '500':
          description: Internal Server Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorDetails'
      tags:
        - Transfers
      x-security:
        Transfer funds: present
    delete:
      operationId: cancelTransfer
      summary: Cancel a transfer request
      description: |
        Permissions required: **Transfer funds**




        Cancel a transfer request. Transfer requests in the `QUEUED` state can always be cancelled. Transfer requests in the `IN_PROGRESS` state can sometimes be cancelled if the request has not been broadcast on the blockchain. Trying to cancel a request that cannot be cancelled will return a `409 Conflict` error code. Transfers can only be canceled by the API key responsible for creating that transfer (either created directly via CreateTransfer or indirectly via ExecuteHold)
      parameters:
        - name: Api-Signature
          in: header
          description: |
            A hex-encoded Ed25519 signature of `timestamp_epoch_seconds + uppercase(http_method) + request_path + request_body`.



            Construction example:

              ```
              toHex(
                ed25519Sign(
                  signing_key,
                  '{}{}{}{}'.format(timestamp_epoch_seconds, toUpper(httpMethod), httpRequestPath, httpBody)
                )
              )
              ```
          required: true
          schema:
            type: string
            pattern: '^[0-9A-Fa-f]{128,160}$'
        - name: Api-Timestamp
          in: header
          description: 'Current timestamp, represented as unix epoch seconds'
          required: true
          schema:
            type: integer
            format: int64
        - name: transferId
          in: path
          description: The ID of the transfer to cancel
          required: true
          schema:
            type: string
      responses:
        '204':
          description: Transfer request successfully cancelled
        '400':
          description: Bad Request
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorDetails'
        '401':
          description: Unauthenticated
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorDetails'
        '403':
          description: Forbidden
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorDetails'
        '404':
          description: Not Found
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorDetails'
        '409':
          description: Conflict
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorDetails'
        '429':
          description: Too Many Requests
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorDetails'
        '500':
          description: Internal Server Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorDetails'
      tags:
        - Transfers
      x-security:
        Transfer funds: present
  /asset-types:
    get:
      operationId: getAssetTypes
      summary: List supported asset types
      description: |
        Permissions required: none



        List all of the supported asset types for your organization. Each asset type object includes the name of the asset (ex. Bitcoin) as well as the asset type (ex. BTC), which usually corresponds to the asset's ticker symbol.


        #### Filters


        You may optionally supply the following filters:


        - Specify the `asset types` to filter the organization asset types. Multiple asset types should be separated by commas.


          For example:

          To filter a single asset type to only Bitcoin we can use /v2/asset-types?assetTypes=BTC

          To filter multiple asset types for instance Bitcoin and Ethereum we could use /v2/asset-types?assetTypes=BTC,ETH

        - Specify the `feature types` to filter the organization asset types. Multiple features should be separated by commas.


          For example:

          To filter all organization assets that have the HOLD feature we can use /v2/asset-types?assetFeatures=HOLDS

          To filter all organization assets that have the HOLD or TRANSFERS feature we can use /v2/asset-types?assetFeatures=HOLDS,TRANSFERS
      parameters:
        - name: assetTypes
          in: query
          description: |
            The asset type IDs to be used as filter for the organization asset types.

            An asset type is considering to be passing this filter, if this set is not empty.
          schema:
            type: array
            items:
              type: string
            uniqueItems: true
          explode: false
          style: form
        - name: assetFeatures
          in: query
          description: |
            The asset features to be used as filter for the organization asset types.

            An asset type is considering to be passing this filter, if this set is not empty, and at least one of the features is supported by the asset type.
          schema:
            type: array
            items:
              type: string
              enum:
                - TRANSFERS
                - HOLDS
            uniqueItems: true
          explode: false
          style: form
      responses:
        '200':
          description: List of supported asset types for your organization
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/AssetTypesResponse'
        '400':
          description: Bad Request
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorDetails'
        '401':
          description: Unauthenticated
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorDetails'
        '403':
          description: Forbidden
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorDetails'
        '429':
          description: Too Many Requests
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorDetails'
        '500':
          description: Internal Server Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorDetails'
      tags:
        - Asset Types
      x-security:
        None: present
  /vaults:
    get:
      operationId: getVaults
      summary: List vaults
      description: |+
        Permissions required: **Read vault activity**




        List vault metadata including name, ID, description, and assets.


        NOTE: price and USD value information is recent but does not reflect real-time data.

      parameters:
        - name: afterId
          in: query
          description: When paginating this is used to provide the starting point for the page to fetch (retrieved from the previous response body)
          schema:
            type: string
        - name: limit
          in: query
          description: Maximum number of results to return per query
          schema:
            type: integer
            format: int64
            default: 25
            maximum: 100
            minimum: 1
      responses:
        '200':
          description: A list of vaults and their metadata
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/VaultsResponse'
        '400':
          description: Bad Request
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorDetails'
        '401':
          description: Unauthenticated
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorDetails'
        '403':
          description: Forbidden
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorDetails'
        '429':
          description: Too Many Requests
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorDetails'
        '500':
          description: Internal Server Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorDetails'
      tags:
        - Vaults
      x-security:
        Read vault activity: present
  '/vaults/{vaultId}':
    get:
      operationId: getVault
      summary: Get vault by ID
      description: |
        Permissions required: **Read vault activity**



        Get vault by ID
      parameters:
        - name: vaultId
          in: path
          description: The ID of the vault to get details for
          required: true
          schema:
            type: string
      responses:
        '200':
          description: A vault's metadata
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/VaultsResponse1'
        '400':
          description: Bad Request
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorDetails'
        '401':
          description: Unauthenticated
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorDetails'
        '403':
          description: Forbidden
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorDetails'
        '404':
          description: Not Found
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorDetails'
        '429':
          description: Too Many Requests
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorDetails'
        '500':
          description: Internal Server Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorDetails'
      tags:
        - Vaults
      x-security:
        Read vault activity: checkSourceVault
  /transactions:
    get:
      operationId: getTransactions
      summary: List transactions
      description: |
        Permissions required: **Read vault activity**




        List all transactions for the vaults permissioned to your API key. You can retrieve metadata about your API key from the [API Key](#tags/API-Key) endpoints.


        NOTE: price and USD value information is recent but does not reflect real-time data.


        **Filters**



        You may optionally supply the following filters:


          - Set a date range by providing the `startDate` and/or `endDate` query parameters. The date refers to the end time of a transaction: when the transaction succeeded or failed. If the date parameters are omitted, all transactions will be returned.
          - Select transactions involving a specific vault by providing the `vaultId` parameter. If the `vaultId` parameter is omitted, transactions for all vaults for which your API key is permissioned will be returned.
          - Filter transactions of one or more types with the `types` parameter. Multiple types should be separated by commas.
          - Select transactions involving a specific wallet by providing the `walletId` parameter. If the `walletId` parameter is omitted, transactions for all vaults for which your API key is permissioned will be returned.
          - Filter transactions by the receiving address with the `destinationAddress` parameter.
      parameters:
        - name: vaultId
          in: query
          description: The vault ID to get transactions for
          schema:
            type: string
        - name: startDate
          in: query
          description: 'The start date (inclusive) in `YYYY-MM-DD` format. The earliest valid start date is ''2017-01-01`. Dates are always in UTC [RFC 3339](https://datatracker.ietf.org/doc/html/rfc3339#section-5.6) ''full-date''.'
          schema:
            type: string
            format: date
        - name: endDate
          in: query
          description: 'The end date (inclusive) in `YYYY-MM-DD` format. The latest valid end date is the current date. Dates are always in UTC [RFC 3339](https://datatracker.ietf.org/doc/html/rfc3339#section-5.6) ''full-date''.'
          schema:
            type: string
            format: date
        - name: afterId
          in: query
          description: When paginating this is used to provide the starting point for the page to fetch (retrieved from the previous response body)
          schema:
            type: string
        - name: limit
          in: query
          description: Maximum number of results to return per query
          schema:
            type: integer
            format: int64
            default: 25
            maximum: 100
            minimum: 1
        - name: types
          in: query
          description: A comma-separated list of transaction types to return.
          schema:
            type: array
            items:
              type: string
              enum:
                - DEPOSIT
                - WITHDRAW
                - TRANSFER
                - DELEGATION_REWARD
                - STAKING_REWARD
                - RESTAKING_REWARD
                - ALLUVIAL_STAKING_REWARD
                - MINT
                - BURN
                - DIEM_PREBURN
                - GAS_STATION
                - OTHER
            uniqueItems: true
          explode: false
          style: form
        - name: walletId
          in: query
          description: An ID uniquely identifying an Anchorage Digital wallet
          schema:
            type: string
        - name: destinationAddress
          in: query
          description: The destination address on the transaction for which results will be returned
          schema:
            type: string
      responses:
        '200':
          description: A list of transactions
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/TransactionsResponse'
        '400':
          description: Bad Request
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorDetails'
        '401':
          description: Unauthenticated
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorDetails'
        '403':
          description: Forbidden
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorDetails'
        '404':
          description: Not Found
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorDetails'
        '429':
          description: Too Many Requests
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorDetails'
        '500':
          description: Internal Server Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorDetails'
      tags:
        - Transactions
      x-security:
        Read vault activity: present
  '/transactions/{transactionId}':
    get:
      operationId: getTransaction
      summary: Get transaction by ID
      description: |
        Permissions required: **Read vault activity**


        Get transaction by ID.
      parameters:
        - name: transactionId
          in: path
          description: The ID of the transaction to get details for
          required: true
          schema:
            type: string
      responses:
        '200':
          description: A transaction's metadata
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/TransactionResponse'
        '400':
          description: Bad Request
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorDetails'
        '401':
          description: Unauthenticated
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorDetails'
        '403':
          description: Forbidden
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorDetails'
        '404':
          description: Not Found
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorDetails'
        '429':
          description: Too Many Requests
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorDetails'
        '500':
          description: Internal Server Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorDetails'
      tags:
        - Transactions
      x-security:
        Read vault activity: present
  '/transactions/{transactionId}/reject':
    post:
      operationId: rejectTransaction
      summary: Reject a transaction
      description: |
        Permissions required: **Reject Operations**


        Reject an in-progress transaction. The caller's API key must hold the
        `Reject Operations` permission for the source vault. Operations already
        in a final state return 409 Conflict.

        Only withdrawals, transfers, delegations, and generic operations
        (including bridge transactions) can be rejected via this endpoint;
        rejecting any other operation type returns 409 Conflict.

        A transaction can only be rejected before it has been submitted for
        signing and broadcast to the network. This endpoint cannot be used to
        cancel a transaction stuck in the broadcasting state due to a low gas
        fee.
      parameters:
        - name: transactionId
          in: path
          description: The ID of the transaction to reject
          required: true
          schema:
            type: string
      responses:
        '204':
          description: Transaction successfully rejected
        '401':
          description: Unauthenticated
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorDetails'
        '403':
          description: Forbidden
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorDetails'
        '404':
          description: Not Found
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorDetails'
        '409':
          description: Conflict
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorDetails'
        '429':
          description: Too Many Requests
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorDetails'
        '500':
          description: Internal Server Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorDetails'
      tags:
        - Transactions
      x-mint:
        href: api-reference/v2/transactions/reject-a-transaction
      x-security:
        Reject Operations: checkSourceVault
  /offchainvesting/schedules:
    get:
      operationId: getOffchainVestingSchedules
      summary: List offchain vesting schedules for an organization
      description: Get all offchain vesting schedules for an organization.
      parameters:
        - name: afterId
          in: query
          description: When paginating this is used to provide the starting point for the page to fetch (retrieved from the previous response body)
          schema:
            type: string
        - name: limit
          in: query
          description: Maximum number of results to return per query
          schema:
            type: integer
            format: int64
            default: 25
            maximum: 100
            minimum: 1
      responses:
        '200':
          description: List of offchain vesting schedules
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/OffchainVestingSchedulesResponse'
        '400':
          description: Bad Request
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorDetails'
        '401':
          description: Unauthenticated
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorDetails'
        '403':
          description: Forbidden
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorDetails'
        '404':
          description: Not Found
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorDetails'
        '429':
          description: Too Many Requests
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorDetails'
        '500':
          description: Internal Server Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorDetails'
      tags:
        - Vesting
      x-security:
        Read vault activity: present
  '/wallets/{walletId}/staking/rewards':
    get:
      operationId: getWalletRewards
      summary: Staking rewards for a wallet
      description: |
        Permissions required: **Read vault activity**


        Get wallet rewards details for the specified `walletId`.
      parameters:
        - name: walletId
          in: path
          description: An ID uniquely identifying an Anchorage Digital wallet
          required: true
          schema:
            type: string
        - name: startDate
          in: query
          description: 'The start date (inclusive) in `YYYY-MM-DD` format. The earliest valid start date is ''2017-01-01`. Dates are always in UTC [RFC 3339](https://datatracker.ietf.org/doc/html/rfc3339#section-5.6) ''full-date''.'
          schema:
            type: string
            format: date
        - name: endDate
          in: query
          description: 'The end date (inclusive) in `YYYY-MM-DD` format. The latest valid end date is the current date. Dates are always in UTC [RFC 3339](https://datatracker.ietf.org/doc/html/rfc3339#section-5.6) ''full-date''.'
          schema:
            type: string
            format: date
        - name: afterId
          in: query
          description: When paginating this is used to provide the starting point for the page to fetch (retrieved from the previous response body)
          schema:
            type: string
        - name: limit
          in: query
          description: Maximum number of results to return per query
          schema:
            type: integer
            format: int64
            default: 25
            maximum: 100
            minimum: 1
      responses:
        '200':
          description: Wallet rewards info for the specified wallet
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/WalletRewardsResponse'
        '400':
          description: Bad Request
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorDetails'
        '401':
          description: Unauthenticated
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorDetails'
        '403':
          description: Forbidden
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorDetails'
        '404':
          description: Not Found
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorDetails'
        '429':
          description: Too Many Requests
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorDetails'
        '500':
          description: Internal Server Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorDetails'
      tags:
        - Wallets
      x-security:
        Read vault activity: checkSourceVault
  '/wallets/{walletId}/staking/positions':
    get:
      operationId: getWalletPositions
      summary: Staking positions for a wallet
      description: |
        Permissions required: **Read vault activity**


        Get wallet staking positions details for the specified `walletId`.
      parameters:
        - name: walletId
          in: path
          description: An ID uniquely identifying an Anchorage Digital wallet
          required: true
          schema:
            type: string
        - name: afterId
          in: query
          description: When paginating this is used to provide the starting point for the page to fetch (retrieved from the previous response body)
          schema:
            type: string
        - name: limit
          in: query
          description: Maximum number of results to return per query
          schema:
            type: integer
            format: int64
            default: 25
            maximum: 100
            minimum: 1
        - name: transactionId
          in: query
          description: The transaction Id to filter the wallet positions
          schema:
            type: string
      responses:
        '200':
          description: Wallet positions info for the specified wallet
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/WalletPositionsResponse'
        '400':
          description: Bad Request
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorDetails'
        '401':
          description: Unauthenticated
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorDetails'
        '403':
          description: Forbidden
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorDetails'
        '404':
          description: Not Found
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorDetails'
        '429':
          description: Too Many Requests
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorDetails'
        '500':
          description: Internal Server Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorDetails'
      tags:
        - Wallets
      x-security:
        Read vault activity: checkSourceVault
  /transactions/stake:
    post:
      operationId: createStake
      summary: Create a stake request
      description: |
        Permissions required: **Initiate Staking and Unstaking**



        #### Identify the sending asset


        To initiate a staking operation, you must identify which asset you'd like to stake funds from. Provide a `source` and `assetType`.



        #### Permissions


        The provided API key must be associated with a [permission group](#section/Authentication-and-Security/Permission-Groups) that has Initiate Staking and Unstaking permission for the sending vault.


        #### Additional Metadata


        You may provide a `description` with each staking operation, that will be visible within your organization in the Anchorage Digital iOS Application.


        #### Successful Staking


        If the stake request is valid, the request will initiate a stake transaction from the sending wallet. It will still require a quorum of approvals on the Anchorage Digital iOS app and will undergo manual Anchorage Digital Risk Review. Like other transactions, these will be visible on the Anchorage Digital iOS Application, the Web Dashboard, and in the [list transactions](#operation/getTransactions) API endpoint.


        #### Unsuccessful Stakes


        A stake request may fail for any of the following reasons:

          - An ongoing stake already exists
          - The specified asset does not exist
          - The specified amount exceeds the available funds for this asset (insufficient funds)
          - The provided API key does not have permissions to initiate staking from this vault

        If the initiated stake is approved by the quorum, the transaction may fail for any of the following reasons:

          - There are insufficient funds to pay the blockchain network fee at the time of this transaction
          - There is a failure on the blockchain


        #### Feature under development


        Currently, specific assets parameters are under development and will not be considered in any staking request. These include:

          - Solana staking;
          - ETH Pectra staking.
      parameters:
        - name: Api-Signature
          in: header
          description: |
            A hex-encoded Ed25519 signature of `timestamp_epoch_seconds + uppercase(http_method) + request_path + request_body`.

            Construction example:

              ```
              toHex(
                ed25519Sign(
                  signing_key,
                  '{}{}{}{}'.format(timestamp_epoch_seconds, toUpper(httpMethod), httpRequestPath, httpBody)
                )
              )
              ```
          required: true
          schema:
            type: string
            pattern: '^[0-9A-Fa-f]{128,160}$'
        - name: Api-Timestamp
          in: header
          description: 'Current timestamp, represented as unix epoch seconds'
          required: true
          schema:
            type: integer
            format: int64
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/CreateStakeRequest'
      responses:
        '201':
          description: Successfully initiated a stake transaction
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/CreateStakeResponse'
        '400':
          description: Bad Request
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorDetails'
        '401':
          description: Unauthenticated
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorDetails'
        '403':
          description: Forbidden
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorDetails'
        '404':
          description: Not Found
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorDetails'
        '409':
          description: Conflict
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorDetails'
        '429':
          description: Too Many Requests
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorDetails'
        '500':
          description: Internal Server Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorDetails'
      tags:
        - Transactions
      x-security:
        Initiate Staking and Unstaking: checkSourceVault
  /transactions/unstake:
    post:
      operationId: createUnstake
      summary: Create an unstake request
      description: |
        Permissions required: **Initiate Staking and Unstaking**



        #### Identify the sending asset


        To initiate an unstake transaction, you must identify which asset you'd like to unstake funds from. Provide a `source` and `assetType`.



        #### Permissions


        The provided API key must be associated with a [permission group](#section/Authentication-and-Security/Permission-Groups) that has Initiate Staking and Unstaking permission for the sending vault.


        #### Additional Metadata


        You may provide a `description` with each stake, that will be visible within your organization in the Anchorage Digital iOS Application.


        #### Successful Unstakes


        If the stake request is valid, the request will initiate a stake transaction from the sending wallet. It will still require a quorum of approvals on the Anchorage Digital iOS app and will undergo manual Anchorage Digital Risk Review. Like other transactions, these will be visible on the Anchorage Digital iOS Application, the Web Dashboard, and in the [list transactions](#operation/getTransactions) API endpoint.


        #### Unsuccessful Unstakes


        A unstake request may fail for any of the following reasons:

          - An ongoing unstake already exists
          - The specified asset does not exist
          - The specified amount exceeds the available funds to unstake for this asset (insufficient funds)
          - The provided API key does not have permissions to initiate staking from this vault

        If the initiated stake is approved by the quorum, the transaction may fail for any of the following reasons:

          - There are insufficient funds to pay the blockchain network fee at the time of this transaction
          - There is a failure on the blockchain
      parameters:
        - name: Api-Signature
          in: header
          description: |
            A hex-encoded Ed25519 signature of `timestamp_epoch_seconds + uppercase(http_method) + request_path + request_body`.

            Construction example:

              ```
              toHex(
                ed25519Sign(
                  signing_key,
                  '{}{}{}{}'.format(timestamp_epoch_seconds, toUpper(httpMethod), httpRequestPath, httpBody)
                )
              )
              ```
          required: true
          schema:
            type: string
            pattern: '^[0-9A-Fa-f]{128,160}$'
        - name: Api-Timestamp
          in: header
          description: 'Current timestamp, represented as unix epoch seconds'
          required: true
          schema:
            type: integer
            format: int64
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/CreateUnstakeRequest'
      responses:
        '201':
          description: Successfully initiated a unstake transaction
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/CreateUnstakeResponse'
        '400':
          description: Bad Request
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorDetails'
        '401':
          description: Unauthenticated
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorDetails'
        '403':
          description: Forbidden
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorDetails'
        '404':
          description: Not Found
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorDetails'
        '409':
          description: Conflict
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorDetails'
        '429':
          description: Too Many Requests
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorDetails'
        '500':
          description: Internal Server Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorDetails'
      tags:
        - Transactions
      x-security:
        Initiate Staking and Unstaking: checkSourceVault
  /transactions/collect:
    post:
      operationId: collectStaking
      summary: Create a collect request
      description: |-
        Permissions required: **Initiate Staking and Unstaking**



        In staking, the "collect" operation is the action of claiming inactive unstaked amount back to
        the available balance by moving them from the staking protocol or pool into a personal wallet. Once collected, these amounts are fully under wallet's owner control.

        *NOTE: This endpoint is under development.*
      parameters:
        - name: Api-Signature
          in: header
          description: |
            A hex-encoded Ed25519 signature of `timestamp_epoch_seconds + uppercase(http_method) + request_path + request_body`.

            Construction example:

              ```
              toHex(
                ed25519Sign(
                  signing_key,
                  '{}{}{}{}'.format(timestamp_epoch_seconds, toUpper(httpMethod), httpRequestPath, httpBody)
                )
              )
              ```
          required: true
          schema:
            type: string
            pattern: '^[0-9A-Fa-f]{128,160}$'
        - name: Api-Timestamp
          in: header
          description: 'Current timestamp, represented as unix epoch seconds'
          required: true
          schema:
            type: integer
            format: int64
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/CreateCollectRequest'
      responses:
        '201':
          description: Successfully initiated a collect transaction
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/CreateCollectResponse'
        '400':
          description: Bad Request
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorDetails'
        '401':
          description: Unauthenticated
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorDetails'
        '403':
          description: Forbidden
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorDetails'
        '404':
          description: Not Found
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorDetails'
        '409':
          description: Conflict
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorDetails'
        '429':
          description: Too Many Requests
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorDetails'
        '500':
          description: Internal Server Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorDetails'
        '501':
          description: Not Implemented Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorDetails'
      tags:
        - Transactions
      x-security:
        Initiate Staking and Unstaking: checkSourceVault
  /transactions/consolidate-stake:
    post:
      operationId: createConsolidateStake
      summary: Create a consolidate stake request
      description: |
        Permissions required: **Initiate Staking and Unstaking**



        Consolidate a source staking position into a target staking position.
        Only supported for Ethereum 0x02 validators.
      parameters:
        - name: Api-Signature
          in: header
          description: |
            A hex-encoded Ed25519 signature of `timestamp_epoch_seconds + uppercase(http_method) + request_path + request_body`.

            Construction example:

              ```
              toHex(
                ed25519Sign(
                  signing_key,
                 '{}{}{}{}'.format(timestamp_epoch_seconds, toUpper(httpMethod), httpRequestPath, httpBody)
                )
              )
              ```
          required: true
          schema:
            type: string
            pattern: '^[0-9A-Fa-f]{128,160}$'
        - name: Api-Timestamp
          in: header
          description: 'Current timestamp, represented as unix epoch seconds'
          required: true
          schema:
            type: integer
            format: int64
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/CreateConsolidateStakeRequest'
      responses:
        '201':
          description: Successfully initiated a consolidate stake transaction
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/CreateStakeResponse'
        '400':
          description: Bad Request
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorDetails'
        '401':
          description: Unauthenticated
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorDetails'
        '403':
          description: Forbidden
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorDetails'
        '404':
          description: Not Found
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorDetails'
        '409':
          description: Conflict
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorDetails'
        '429':
          description: Too Many Requests
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorDetails'
        '500':
          description: Internal Server Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorDetails'
      tags:
        - Transactions
      x-security:
        Initiate Staking and Unstaking: checkSourceVault
  '/delegation-addresses/{assetType}':
    get:
      operationId: getDelegationAddresses
      summary: List supported delegation addresses
      description: |
        Permissions required: **Initiate Staking and Unstaking**



        #### Identify the sending asset


        To initiate an operation, you must identify which asset you'd like to view the delegation addresses for. Provide an `assetType`.



        #### Permissions


        The provided API key must be associated with a [permission group](#section/Authentication-and-Security/Permission-Groups) that has Initiate Staking and Unstaking permission for the sending vault.
      parameters:
        - name: assetType
          in: path
          description: The asset type to retrieve delegation addresses
          required: true
          schema:
            type: string
        - name: afterId
          in: query
          description: When paginating this is used to provide the starting point for the page to fetch (retrieved from the previous response body)
          schema:
            type: string
        - name: limit
          in: query
          description: Maximum number of results to return per query
          schema:
            type: integer
            format: int64
            default: 25
            maximum: 100
            minimum: 1
      responses:
        '200':
          description: List of delegation addresses for this asset
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/DelegationAddressesResponse'
        '400':
          description: Bad Request
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorDetails'
        '401':
          description: Unauthenticated
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorDetails'
        '403':
          description: Forbidden
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorDetails'
        '404':
          description: Not Found
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorDetails'
        '429':
          description: Too Many Requests
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorDetails'
        '500':
          description: Internal Server Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorDetails'
      tags:
        - Transactions
  '/transactions/wallet/{walletId}/position/{positionId}/stake-transfer':
    post:
      operationId: transferStakePosition
      summary: Consolidate Positions Across Orgs
      description: |-
        Permissions required: **Initiate Staking and Unstaking** and **Initiate withdrawals**


        Allows the user to transfer a staked position to another Organization within Anchorage.
      parameters:
        - name: walletId
          in: path
          description: An ID uniquely identifying an Anchorage Digital wallet
          required: true
          schema:
            type: string
        - name: positionId
          in: path
          description: The staking position to be sold identifier
          required: true
          schema:
            type: string
        - name: Api-Signature
          in: header
          description: |
            A hex-encoded Ed25519 signature of `timestamp_epoch_seconds + uppercase(http_method) + request_path + request_body`.

            Construction example:

              ```
              toHex(
                ed25519Sign(
                  signing_key,
                  '{}{}{}{}'.format(timestamp_epoch_seconds, toUpper(httpMethod), httpRequestPath, httpBody)
                )
              )
              ```
          required: true
          schema:
            type: string
            pattern: '^[0-9A-Fa-f]{128,160}$'
        - name: Api-Timestamp
          in: header
          description: 'Current timestamp, represented as unix epoch seconds'
          required: true
          schema:
            type: integer
            format: int64
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/TransferStakedPositionRequest'
      responses:
        '202':
          description: Identifier of the transfer
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/TransferStakedPositionResponse'
        '400':
          description: Bad Request
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorDetails'
        '401':
          description: Unauthenticated
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorDetails'
        '403':
          description: Forbidden
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorDetails'
        '404':
          description: Not Found
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorDetails'
        '429':
          description: Too Many Requests
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorDetails'
        '500':
          description: Internal Server Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorDetails'
      tags:
        - Transactions
      x-mint:
        href: api-reference/v2/transactions/stake-transfer
  /webhook/validation-key:
    get:
      operationId: getWebhookValidationKey
      summary: Get webhook validation key
      description: |-
        Permissions required: **Configure Webhooks**


        Get key to validate webhook authenticity.
      parameters: []
      responses:
        '200':
          description: Webhook event type list
          content:
            application/json:
              schema:
                type: object
                properties:
                  value:
                    type: string
                required:
                  - value
        '401':
          description: Unauthenticated
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorDetails'
        '403':
          description: Forbidden
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorDetails'
        '429':
          description: Too Many Requests
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorDetails'
        '500':
          description: Internal Server Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorDetails'
      tags:
        - Webhook Notifications
  /webhook/event-types:
    get:
      operationId: listWebhookEventTypes
      summary: List webhook event types
      description: |-
        Permissions required: **Configure Webhooks**


        List the available webhook event types that you can subscribe to.
      parameters:
        - name: afterId
          in: query
          description: When paginating this is used to provide the starting point for the page to fetch (retrieved from the previous response body)
          schema:
            type: string
        - name: limit
          in: query
          description: Maximum number of results to return per query
          schema:
            type: integer
            format: int64
            default: 25
            maximum: 100
            minimum: 1
      responses:
        '200':
          description: Webhook event type list
          content:
            application/json:
              schema:
                type: object
                properties:
                  data:
                    type: array
                    items:
                      $ref: '#/components/schemas/WebhookEventType'
                  page:
                    $ref: '#/components/schemas/Page'
                required:
                  - data
                  - page
        '400':
          description: Bad Request
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorDetails'
        '401':
          description: Unauthenticated
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorDetails'
        '403':
          description: Forbidden
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorDetails'
        '429':
          description: Too Many Requests
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorDetails'
        '500':
          description: Internal Server Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorDetails'
      tags:
        - Webhook Notifications
  /webhook/endpoints:
    post:
      operationId: createWebhookEndpoints
      summary: Create webhook endpoint
      description: |-
        Permissions required: **Configure Webhooks**


        Create a new endpoint where you would like to receive webhook notifications.
      parameters: []
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: array
              items:
                $ref: '#/components/schemas/NewWebhookEndpoint'
              title: CreateWebhookEndpointsRequest
      responses:
        '201':
          description: Created webhook endpoint ids
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/CreateWebhookEndpointsResponse'
        '400':
          description: Bad Request
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorDetails'
        '401':
          description: Unauthenticated
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorDetails'
        '403':
          description: Forbidden
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorDetails'
        '409':
          description: Conflict
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorDetails'
        '429':
          description: Too Many Requests
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorDetails'
        '500':
          description: Internal Server Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorDetails'
      tags:
        - Webhook Notifications
    get:
      operationId: listWebhookEndpoints
      summary: List webhook endpoint
      description: |-
        Permissions required: **Configure Webhooks**


        List all of your webhook endpoints.
      parameters:
        - name: afterId
          in: query
          description: When paginating this is used to provide the starting point for the page to fetch (retrieved from the previous response body)
          schema:
            type: string
        - name: limit
          in: query
          description: Maximum number of results to return per query
          schema:
            type: integer
            format: int64
            default: 25
            maximum: 100
            minimum: 1
      responses:
        '200':
          description: Webhook endpoint list
          content:
            application/json:
              schema:
                type: object
                properties:
                  data:
                    type: array
                    items:
                      $ref: '#/components/schemas/WebhookEndpointResponse'
                  page:
                    $ref: '#/components/schemas/Page'
                required:
                  - data
                  - page
        '400':
          description: Bad Request
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorDetails'
        '401':
          description: Unauthenticated
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorDetails'
        '403':
          description: Forbidden
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorDetails'
        '429':
          description: Too Many Requests
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorDetails'
        '500':
          description: Internal Server Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorDetails'
      tags:
        - Webhook Notifications
  '/webhook/endpoints/{endpointId}':
    get:
      operationId: getWebhookEndpoint
      summary: Get webhook endpoint config
      description: |-
        Permissions required: **Configure Webhooks**


        Get the configuration details for an endpoint.
      parameters:
        - name: endpointId
          in: path
          description: Unique identifier for the endpoint
          required: true
          schema:
            type: string
            format: uuid
      responses:
        '200':
          description: Webhook endpoint
          content:
            application/json:
              schema:
                type: object
                properties:
                  data:
                    $ref: '#/components/schemas/WebhookEndpointResponse'
                required:
                  - data
        '400':
          description: Bad Request
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorDetails'
        '401':
          description: Unauthenticated
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorDetails'
        '403':
          description: Forbidden
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorDetails'
        '404':
          description: Not Found
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorDetails'
        '429':
          description: Too Many Requests
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorDetails'
        '500':
          description: Internal Server Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorDetails'
      tags:
        - Webhook Notifications
    patch:
      operationId: updateWebhookEndpoint
      summary: Update webhook endpoint
      description: |-
        Permissions required: **Configure Webhooks**


        Update the configuration for an endpoint.
      parameters:
        - name: endpointId
          in: path
          description: Unique identifier for the endpoint
          required: true
          schema:
            type: string
            format: uuid
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/WebhookEndpointPatch'
      responses:
        '200':
          description: Successfully updated webhook endpoint
        '400':
          description: Bad Request
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorDetails'
        '401':
          description: Unauthenticated
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorDetails'
        '403':
          description: Forbidden
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorDetails'
        '404':
          description: Not Found
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorDetails'
        '429':
          description: Too Many Requests
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorDetails'
        '500':
          description: Internal Server Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorDetails'
      tags:
        - Webhook Notifications
  '/webhook/endpoints/{endpointId}/subscriptions':
    post:
      operationId: createWebhookEndpointSubscriptions
      summary: Create webhook subscriptions
      description: |-
        Permissions required: **Configure Webhooks**


        Subscribe to event types to receive notifications in a webhook endpoint.
      parameters:
        - name: endpointId
          in: path
          description: Unique identifier for the endpoint
          required: true
          schema:
            type: string
            format: uuid
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: array
              items:
                $ref: '#/components/schemas/NewWebhookEndpointSubscription'
              title: CreateWebhookEndpointSubscriptionsRequest
      responses:
        '201':
          description: Successfully created webhook subscription
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/CreateWebhookSubscriptionsResponse'
        '400':
          description: Bad Request
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorDetails'
        '401':
          description: Unauthenticated
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorDetails'
        '403':
          description: Forbidden
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorDetails'
        '404':
          description: Not Found
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorDetails'
        '429':
          description: Too Many Requests
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorDetails'
        '500':
          description: Internal Server Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorDetails'
      tags:
        - Webhook Notifications
    get:
      operationId: listWebhookEndpointSubscriptions
      summary: List webhook endpoint subscriptions
      description: |-
        Permissions required: **Configure Webhooks**


        List the subscriptions that you configured for a webhook endpoint.
      parameters:
        - name: endpointId
          in: path
          description: Unique identifier for the endpoint
          required: true
          schema:
            type: string
            format: uuid
        - name: afterId
          in: query
          description: When paginating this is used to provide the starting point for the page to fetch (retrieved from the previous response body)
          schema:
            type: string
        - name: limit
          in: query
          description: Maximum number of results to return per query
          schema:
            type: integer
            format: int64
            default: 25
            maximum: 100
            minimum: 1
      responses:
        '200':
          description: Webhook subscription list
          content:
            application/json:
              schema:
                type: object
                properties:
                  data:
                    type: array
                    items:
                      $ref: '#/components/schemas/WebhookEndpointSubscription'
                  page:
                    $ref: '#/components/schemas/Page'
                required:
                  - data
                  - page
        '400':
          description: Bad Request
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorDetails'
        '401':
          description: Unauthenticated
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorDetails'
        '403':
          description: Forbidden
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorDetails'
        '404':
          description: Not Found
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorDetails'
        '429':
          description: Too Many Requests
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorDetails'
        '500':
          description: Internal Server Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorDetails'
      tags:
        - Webhook Notifications
  '/webhook/endpoints/{endpointId}/subscriptions/{eventTypeId}':
    delete:
      operationId: cancelWebhookEndpointSubscription
      summary: Cancel webhook subscription
      description: |-
        Permissions required: **Configure Webhooks**


        Cancel a webhook subscription to stop receiving notifications for its event type in its webhook endpoint.
      parameters:
        - name: endpointId
          in: path
          description: Unique identifier for the endpoint
          required: true
          schema:
            type: string
            format: uuid
        - name: eventTypeId
          in: path
          description: concatenation of topic+"."+name
          required: true
          schema:
            type: string
          example: withdrawal.initiated
      responses:
        '204':
          description: Successfully canceled webhook subscription
        '401':
          description: Unauthenticated
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorDetails'
        '403':
          description: Forbidden
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorDetails'
        '404':
          description: Not Found
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorDetails'
        '429':
          description: Too Many Requests
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorDetails'
        '500':
          description: Internal Server Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorDetails'
      tags:
        - Webhook Notifications
components:
  schemas:
    APIKeyDetails:
      type: object
      properties:
        id:
          description: An ID uniquely identifying an API key.
          type: string
        permissions:
          description: 'The permissions enabled for an API key. Each permission maps to an object, which may contain additional qualifiers.'
          type: array
          items:
            type: object
            required:
              - permission
            properties:
              permission:
                type: string
                enum:
                  - AUTHORIZE_SETTLEMENTS
                  - CREATE_DEPOSIT_ADDRESS
                  - DEPOSIT_ATTRIBUTION
                  - EXTERNAL_LOAN_WRITE
                  - FACILITY_ONLY
                  - INTERNAL_TRANSFER
                  - INITIATE_WITHDRAWAL
                  - LENDER_READ
                  - ONBOARDING
                  - WRITE_TAX
                  - PROPOSE_ACCEPT_SETTLEMENTS
                  - READ
                  - READ_DEPOSIT_ATTRIBUTION
                  - READ_SUBACCOUNT
                  - READ_TRADE
                  - SUBACCOUNT
                  - TRADE
                  - TRANSFER
                  - CONVERT_STABLECOINS
                  - FIAT_BANKING
                  - CONFIGURE_WEBHOOKS
              vaultIds:
                description: The vaultIds for which this permission may be used. VaultIds are not applicable to all permissions.
                type: array
                items:
                  type: string
                uniqueItems: true
                x-omitempty: true
      example:
        id: b5a58566763e77e2d87a53463013981be7c0b048c1c0dd39ba44e77c99bc1351
        permissions:
          - permission: READ
            vaultIds:
              - 1c920f4241b78a1d483a29f3c24b6c4c
              - 55e89d4a644d736b01533a2ea9b32a20
          - permission: TRADE
      required:
        - id
        - permissions
      title: APIKeyDetails
    APIKeyInfoResponse:
      type: object
      properties:
        data:
          $ref: '#/components/schemas/APIKeyDetails'
      required:
        - data
      title: APIKeyInfoResponse
    ActivateWalletRequest:
      type: object
      properties:
        activateAllCompatibleNetworks:
          description: 'When `true`, activate the source wallet on every network that is key-compatible with its network and enabled for your organization — the same set returned by `compatibleNetworkIds` on `/asset-types` — without enumerating them. Mutually exclusive with `compatibleNetworkIds`; supplying both, or neither, is rejected with a `400`.'
          type: boolean
        compatibleNetworkIds:
          description: Target network IDs to activate the source wallet on. Each network must be key-compatible with the source wallet's network; incompatible entries are reported as `FAILED` in the response without affecting other entries. Mutually exclusive with `activateAllCompatibleNetworks` — provide exactly one.
          type: array
          items:
            type: string
            description: A network ID that shares cryptographic key derivation with the source wallet's network
          maxItems: 25
          minItems: 1
      title: ActivateWalletRequest
    ActivateWalletResponse:
      type: object
      properties:
        results:
          description: 'One entry per requested network, in the order the networks were supplied.'
          type: array
          items:
            $ref: '#/components/schemas/ActivateWalletResult'
      required:
        - results
      title: ActivateWalletResponse
    ActivateWalletResult:
      type: object
      properties:
        errorMessage:
          description: Human-readable explanation when `status` is `FAILED`.
          type: string
        networkId:
          description: The target network ID this entry refers to.
          type: string
        status:
          description: '`SUCCESS` if the wallet was activated (or already existed on the network); `FAILED` if the activation could not proceed for this network.'
          type: string
          enum:
            - SUCCESS
            - FAILED
          x-enum-varnames:
            - ActivateWalletResultStatusSUCCESS
            - ActivateWalletResultStatusFAILED
        walletId:
          description: The wallet's unique identifier on the target network. Present when `status` is `SUCCESS`.
          type: string
      required:
        - networkId
        - status
      title: ActivateWalletResult
    CMCreatePackageRequest:
      description: The request payload for creating a new collateral package.
      type: object
      properties:
        acceleratedMarginCall:
          $ref: '#/components/schemas/CMAcceleratedMarginCall'
        clientReferenceId:
          description: A reference identifier provided by the client for this collateral package
          type: string
        collateralAssetsConfig:
          type: array
          items:
            $ref: '#/components/schemas/CMAssetTrackingConfig'
        critical:
          $ref: '#/components/schemas/CMCritical'
        ltvRoundingPrecision:
          description: Number of decimal places to round LTV values to
          type: integer
        marginCall:
          $ref: '#/components/schemas/CMMarginCall'
        marginReturn:
          $ref: '#/components/schemas/CMMarginReturn'
        pledgorId:
          description: Collateral management participant ID of the Pledgor (borrower) associated with this collateral package
          type: string
        priceStrategy:
          $ref: '#/components/schemas/CMPriceStrategy'
        securedPartyId:
          description: Unique identifier of the secured party (lender) associated with this collateral package
          type: string
      required:
        - pledgorId
        - securedPartyId
        - collateralAssetsConfig
        - priceStrategy
    CMUpdatePackageRequest:
      description: The request payload for updating an existing collateral package. All fields are optional - only provide the fields you want to update.
      type: object
      properties:
        acceleratedMarginCall:
          $ref: '#/components/schemas/CMAcceleratedMarginCallUpdate'
        autoDeleveraging:
          $ref: '#/components/schemas/CMAutoDeleveragingUpdate'
        clientReferenceId:
          description: A reference identifier provided by the client for this collateral package
          type: string
        collateralAssetsConfig:
          description: 'Array of asset tracking configurations. If provided, this will replace the entire existing asset tracking configuration.'
          type: array
          items:
            $ref: '#/components/schemas/CMAssetTrackingConfigUpdate'
        critical:
          $ref: '#/components/schemas/CMCriticalUpdate'
        isActive:
          description: Indicates whether the package should be activated for monitoring or not
          type: boolean
        ltvRoundingPrecision:
          description: Number of decimal places to round LTV values to
          type: integer
        marginCall:
          $ref: '#/components/schemas/CMMarginCallUpdate'
        marginReturn:
          $ref: '#/components/schemas/CMMarginReturnUpdate'
        priceStrategy:
          $ref: '#/components/schemas/CMPriceStrategy'
    CMPackagesResponse:
      type: object
      properties:
        data:
          type: array
          items:
            $ref: '#/components/schemas/CMPackage'
        page:
          $ref: '#/components/schemas/Page'
      required:
        - data
        - page
    CMPackage:
      description: 'A package of different types of collateral which, together, secure a collection of exposures.'
      type: object
      properties:
        acceleratedMarginCall:
          $ref: '#/components/schemas/CMAcceleratedMarginCall'
        active:
          description: Indicates whether the package has been activated for monitoring or not
          type: boolean
        clientReferenceId:
          description: Client-provided reference ID for this Collateral Package
          type: string
        collateralAssets:
          description: 'An array containing objects, where each object represents a specific asset held within the Collateral Package and its associated details'
          type: array
          items:
            $ref: '#/components/schemas/CMCollateralAsset'
        critical:
          $ref: '#/components/schemas/CMCritical'
        currentLtv:
          description: 'The current Loan-to-Value (LTV) ratio for the Collateral Package, expressed as a decimal string'
          type: string
        exposureValue:
          description: 'The current total value of the Exposure(s) associated with this Collateral Package, expressed in USD'
          type: string
        ltvTimestamp:
          description: Timestamp indicating the last time the `currentLtv` was calculated and updated. This timestamp provides context for the recency of the LTV value
          type: string
        marginCall:
          $ref: '#/components/schemas/CMMarginCall'
        marginReturn:
          $ref: '#/components/schemas/CMMarginReturn'
        packageId:
          description: Unique identifier for the Collateral Package
          type: string
        packageValue:
          description: 'The current total value of the Collateral Package, calculated using the configured pricing methodology and real-time price data, expressed in USD'
          type: string
        pledgorId:
          description: Collateral management participant ID of the Pledgor (borrower) associated with this collateral package
          type: string
        securedPartyId:
          description: Collateral management participant ID of the Secure Party (lender) associated with this collateral package
          type: string
        state:
          $ref: '#/components/schemas/CMPackageState'
      required:
        - packageId
        - pledgorId
        - securedPartyId
        - clientReferenceId
        - active
        - collateralAssets
        - critical
    CMCollateralAsset:
      description: A single asset within a collateral package
      type: object
      properties:
        asset:
          $ref: '#/components/schemas/CMAssetType'
        price:
          description: 'The unweighted current price of the collateral asset, used in the LTV calculation, expressed in USD'
          type: string
        quantity:
          description: The quantity of the collateral asset held in the Collateral Package
          type: string
        weight:
          description: 'The configured weight applied to this collateral asset within the Collateral Package, expressed as a decimal string'
          type: string
        weightedValue:
          description: 'The weighted value of the collateral asset, calculated by applying the `weight` to the asset''s value (`price` * `quantity`), expressed in USD'
          type: string
      required:
        - asset
        - weight
    CMAssetType:
      description: Asset symbol or ticker (e.g. BTC)
      type: object
      properties:
        assetType:
          type: string
        type:
          $ref: '#/components/schemas/CMAssetTypeType'
      required:
        - type
        - assetType
    CMAssetTypeType:
      description: 'The type of asset held in the Collateral Package. This can be either `ANCHORAGECUSTODY` for assets held in Anchorage custody, or `EXTERNAL` for assets held outside of Anchorage custody.'
      type: string
      enum:
        - ANCHORAGECUSTODY
        - EXTERNAL
    CMPackageState:
      description: Current state of the Collateral Package
      type: string
      enum:
        - MARGIN_RETURN
        - HEALTHY
        - MARGIN_CALL
        - CRITICAL
        - CLOSED
        - CURE_PERIOD_EXPIRED
        - DEFAULTED
    CMPriceSource:
      description: This field specifies the source from which the price information is derived
      type: string
      enum:
        - COINBASEPRO
        - KRAKEN
        - KAMINO
        - CHAINLINK
        - BINANCE
    CMPriceStrategy:
      description: This field specifies the pricing strategy to be used for the collateral package. To be implemented in the future
      type: string
      enum:
        - DEFAULT
        - BID
        - ASK
        - MID
        - LAST
        - CHAINLINK_STRATEGY
    CMMarginReturn:
      description: Margin Return level config
      type: object
      properties:
        action:
          $ref: '#/components/schemas/CMPackageActionMarginReturn'
        ltv:
          description: The LTV threshold at which the Collateral Package will be eligible for a Margin Return
          type: string
        returnToLtv:
          description: The LTV that a collateral package must return to before a margin return is considered to be fulfilled and the collateral package is returned to a healthy state
          type: string
      required:
        - ltv
        - action
        - returnToLtv
    CMMarginCall:
      description: Margin Call level config
      type: object
      properties:
        action:
          $ref: '#/components/schemas/CMPackageActionMarginCall'
        curePeriod:
          description: 'Time after the margin call that pledgor has to top up collateral and bring the LTV to the ‘returnToLtv’ (healthy state)”. The duration of the cure period, specified in a format such as ''1h'' for 1 hour or ''1m'' for 1 minute.'
          type: string
        curePeriodProtection:
          description: 'If activated, it prevents the transition of the collateral package to the critical stage while the cure period of a previous margin call lasts'
          type: boolean
        ltv:
          description: 'The LTV threshold at which the Collateral Package will enter into this state, subject to cure period constraints'
          type: string
        returnToLtv:
          description: The LTV that a collateral package must return to before a margin call is considered to be fulfilled and the collateral package is returned to a healthy state
          type: string
        topUpType:
          $ref: '#/components/schemas/CMTopUpType'
        warningLtv:
          description: The LTV at which a warning is sent notifying the parties that the collateral package is close to entering a particular state
          type: string
      required:
        - ltv
        - action
        - warningLtv
        - returnToLtv
        - curePeriod
        - curePeriodProtection
        - topUpType
    CMCritical:
      description: Critical level config
      type: object
      properties:
        action:
          $ref: '#/components/schemas/CMPackageActionCritical'
        defaultNotice:
          description: 'A boolean parameter, if marked TRUE Anchorage will send a default notice to the Pledgor upon entering the critical state'
          type: boolean
        ltv:
          description: The LTV threshold at which the Collateral Package will enter into this state
          type: string
        returnToLtv:
          description: The LTV that a collateral package must return to before transitioning back to a healthy state. This parameter is only configured if action within Critical Object is set to ‘Partial’
          type: string
        warningLtv:
          description: The LTV at which a warning is sent notifying the parties that the collateral package is close to entering a particular state
          type: string
      required:
        - ltv
        - action
        - defaultNotice
        - warningLtv
        - returnToLtv
    CMMarginReturnUpdate:
      description: Margin Return level configuration for updates. All fields are optional.
      type: object
      properties:
        action:
          $ref: '#/components/schemas/CMPackageActionMarginReturn'
        ltv:
          description: The LTV threshold at which the Collateral Package will enter into this state
          type: string
        returnToLtv:
          description: The LTV that a collateral package must return to before a margin return is fulfilled
          type: string
        returnType:
          description: 'The type of margin return (e.g., LTV or QUANTITY)'
          type: string
    CMMarginCallUpdate:
      description: Margin Call level configuration for updates. All fields are optional.
      type: object
      properties:
        action:
          $ref: '#/components/schemas/CMPackageActionMarginCall'
        curePeriod:
          description: 'The duration of the cure period, specified in a format such as ''1h'' for 1 hour or ''1m'' for 1 minute'
          type: string
        curePeriodProtection:
          description: Indicates whether cure period protection is enabled
          type: boolean
        ltv:
          description: The LTV threshold at which the Collateral Package will enter into this state
          type: string
        returnToLtv:
          description: The LTV that a collateral package must return to before a margin call is fulfilled
          type: string
        topUpType:
          $ref: '#/components/schemas/CMTopUpType'
        warningLtv:
          description: The LTV at which a warning is sent notifying the parties that the collateral package is close to entering margin call
          type: string
    CMCriticalUpdate:
      description: Critical level configuration for updates. All fields are optional.
      type: object
      properties:
        action:
          $ref: '#/components/schemas/CMPackageActionCritical'
        defaultNotice:
          description: 'If true, Anchorage Digital will send a default notice to the Pledgor upon entering the critical state'
          type: boolean
        ltv:
          description: The LTV threshold at which the Collateral Package will enter into the critical state
          type: string
        returnToLtv:
          description: The LTV that a collateral package must return to before being considered healthy again
          type: string
        warningLtv:
          description: The LTV at which a warning is sent notifying the parties that the collateral package is close to entering critical state
          type: string
    CMAutoDeleveragingUpdate:
      description: Auto-deleveraging configuration for updates. All fields are optional.
      type: object
      properties:
        levels:
          description: 'Array of deleveraging levels, each specifying a price threshold and corresponding liquidation percentage. If provided, replaces all existing levels.'
          type: array
          items:
            $ref: '#/components/schemas/CMDeleveragingLevel'
    CMAcceleratedMarginCall:
      description: Accelerated Margin Call level config
      type: object
      properties:
        action:
          $ref: '#/components/schemas/CMPackageActionMarginCall'
        curePeriod:
          description: 'The duration of the cure period for the accelerated margin call, specified in a format such as ''1h'' for 1 hour or ''1m'' for 1 minute'
          type: string
        ltv:
          description: 'The LTV threshold at which the Collateral Package will enter into an Accelerated Margin Call state, subject to cure period constraints'
          type: string
      required:
        - ltv
        - action
        - curePeriod
    CMAcceleratedMarginCallUpdate:
      description: Accelerated Margin Call level configuration for updates. All fields are optional.
      type: object
      properties:
        action:
          $ref: '#/components/schemas/CMPackageActionMarginCall'
        curePeriod:
          description: 'The duration of the cure period, specified in a format such as ''1h'' for 1 hour or ''1m'' for 1 minute'
          type: string
        ltv:
          description: The LTV threshold at which the Collateral Package will enter into an Accelerated Margin Call state
          type: string
    CMDeleveragingLevel:
      description: A single deleveraging level defining a price trigger and liquidation amount
      type: object
      properties:
        liquidationPercentage:
          description: 'The percentage of collateral to liquidate when this price level is reached, expressed as a decimal string (e.g., ''25'' for 25%)'
          type: string
        price:
          description: 'The price threshold at which this deleveraging level is triggered, expressed as a decimal string'
          type: string
      required:
        - price
        - liquidationPercentage
    CMPackageActionMarginCall:
      description: The action to be taken when the collateral package transitions into a Margin Call state
      type: string
      enum:
        - NONE
        - PARTIAL
        - FULL
        - SWEEP
    CMPackageActionCritical:
      description: The action to be taken when the collateral package transitions into a Critical state
      type: string
      enum:
        - NONE
        - PARTIAL
        - FULL
        - SWEEP
    CMAssetTrackingConfig:
      description: Asset tracking config
      type: object
      properties:
        asset:
          $ref: '#/components/schemas/CMAssetType'
        liquidationPriority:
          description: The priority order for liquidating this asset in the event of a default or margin call
          type: integer
        maxStalenessMinutes:
          description: 'Optional maximum staleness in minutes assigned to the asset price in the collateral package configuration, expressed as an integer. If not specified, uses the system default configured (3 minutes)'
          type: integer
        notes:
          description: Optional additional notes or comments about the asset tracking configuration
          type: string
        priceSource:
          $ref: '#/components/schemas/CMPriceSource'
        weight:
          description: 'The configured weight assigned to the asset in the collateral package configuration, expressed as a decimal string'
          type: string
      required:
        - asset
        - weight
        - liquidationPriority
    CMAssetTrackingConfigUpdate:
      description: Asset tracking configuration for updates. All fields are optional except asset which identifies which asset to update.
      type: object
      properties:
        asset:
          $ref: '#/components/schemas/CMAssetType'
        liquidationPriority:
          description: The priority order for liquidating this asset in the event of a default or margin call
          type: integer
        maxStalenessMinutes:
          description: 'Optional maximum staleness in minutes assigned to the asset price in the collateral package configuration, expressed as an integer. If not specified, uses the system default configured (3 minutes)'
          type: integer
        notes:
          description: Optional additional notes or comments about the asset tracking configuration
          type: string
        priceSource:
          $ref: '#/components/schemas/CMPriceSource'
        weight:
          description: 'The configured weight assigned to the asset in the collateral package configuration, expressed as a decimal string'
          type: string
      required:
        - asset
    CMExposuresResponse:
      type: object
      properties:
        data:
          type: array
          items:
            $ref: '#/components/schemas/CMExposure'
        page:
          $ref: '#/components/schemas/Page'
      required:
        - data
        - page
    CMExposure:
      description: 'In Collateral Management, an Exposure represents a financial obligation secured by collateral assets. It refers to the amount at risk in transactions between a Pledgor (providing collateral) and a Secured Party (receiving security). Exposures can be loans, repos, or other credit arrangements, and are used to calculate risk metrics like the Loan-to-Value (LTV) ratio. Each Exposure links to a Collateral Package containing the pledged assets.'
      type: object
      properties:
        asset:
          $ref: '#/components/schemas/CMAssetType'
        clientReferenceId:
          description: 'Client-provided reference ID for this Expsoure. “For example: client’s internal loan ID'
          type: string
        exposureId:
          description: Unique identifier for the Exposure
          type: string
        packageId:
          description: Identifier of the package of this exposure associated with this exposure
          type: string
        price:
          description: 'The unweighted current price of the Exposure asset, used in the LTV calculation, expressed in USD'
          type: string
        quantity:
          description: The quantity of the collateral asset in the Exposure
          type: string
        value:
          description: 'The value of the Exposure expressed in USD, calculated as Price * Quantity'
          type: string
      required:
        - exposureId
        - clientReferenceId
        - packageId
        - asset
        - price
        - quantity
        - value
    CMUpdateOperationRequest:
      description: Fields for updating a Collateral Management operation. Any fields left null or omitted will not be updated.
      type: object
      properties:
        action:
          $ref: '#/components/schemas/CMOperationActionInput'
        asset:
          $ref: '#/components/schemas/CMAssetType'
        notes:
          description: Optional notes or comments related to the operation. Providing a new value will overwrite existing notes.
          type: string
        quantity:
          description: 'The quantity of the asset to be used in the operation, expressed as a decimal string.'
          type: string
        type:
          $ref: '#/components/schemas/CMOperationTypeInput'
        typeId:
          description: The ID of the collateral package (packageId) or exposure (exposureId) for this operation
          type: string
    DepositAttributionResponse:
      type: object
      properties:
        data:
          type: array
          items:
            $ref: '#/components/schemas/DepositAttribution'
        page:
          $ref: '#/components/schemas/Page'
      required:
        - data
        - page
      title: DepositAttributionResponse
    DepositAttribution:
      type: object
      properties:
        assetType:
          description: |
            A string representing a type of crypto-asset, which usually corresponds to the crypto asset's ticker symbol.

            Use `/asset-types` to list all of the supported asset types for your organization.
          type: string
          example: ETH
        attributedAt:
          description: 'The system timestamp of when the deposit was attributed. Date-times are always in UTC [RFC 3339](https://datatracker.ietf.org/doc/html/rfc3339#section-5.6) with microsecond precision (e.g `2021-01-01T00:00:00.000000Z`). Can be null if the deposit is not attributed.'
          type: string
          example: '2023-07-27T21:16:44.124798Z'
        attributionType:
          description: The available attribution types. Can be null if the deposit is not attributed.
          type: string
          example: CLIENT_API
          enum:
            - MANUAL_STAFF
            - MANUAL_CLIENT
            - CLIENT_API
            - AUTOMATIC
            - SPAM
            - TRUSTED_SOURCES
        blockchainTxId:
          description: Blockchain transaction id of the deposit associated to the attribution.
          type: string
          example: '0x84ddb76708d570101db89fd27b1717484c54417c9f32c63052cdfac9a0bfc0a2'
        createdAt:
          description: 'The system timestamp of when the deposit attribution process started. Date-times are always in UTC [RFC 3339](https://datatracker.ietf.org/doc/html/rfc3339#section-5.6) with microsecond precision (e.g `2021-01-01T00:00:00.000000Z`).'
          type: string
          example: '2023-09-12T11:01:07.953571Z'
        depositTransactionId:
          description: The transactionId where the transactionType is `DEPOSIT`.
          type: string
          example: 0e2b2f9d-8d10-4f1e-960b-28567255045f
        notes:
          description: Additional notes for the deposit attribution. Can be null if the deposit is not attributed.
          type: string
        originatorCountry:
          description: The country of the originator of the deposit. Can be null if the deposit is not attributed.
          type: string
          example: US
        originatorName:
          description: The name of the originator of the deposit. Can be null if the deposit is not attributed.
          type: string
          example: John Doe
        sourceAddresses:
          description: The source addresses of the deposit transaction.
          type: array
          items:
            type: string
          example:
            - '0xb4Bb4E3D7f35ede58d99F5e2b8B04f7AC87f9c88'
            - '0x974CaA59e49682CdA0AD2bbe82983419A2ECC400'
        sourceWalletType:
          description: The type of wallet for the originator of the deposit. Can be null if the deposit is not attributed.
          type: string
          enum:
            - CUSTODIAL
            - SELF_HOSTED
        status:
          description: The status of the Deposit Attribution process
          type: string
          enum:
            - ATTRIBUTED
            - PENDING
            - UNDER_REVIEW
            - BLOCKED
            - NON_ATTRIBUTABLE
            - INITIATED
        subaccountId:
          description: The Subaccount Identifier for the subaccount associated with the deposit. Can be null if there are no subaccounts being used for this use case. Subaccounts are currently in development / early access.
          type: string
          example: ec761b5e-fd2c-497a-a9a0-f8738ac97bdf
      required:
        - depositTransactionId
        - status
        - sourceAddresses
        - createdAt
        - blockchainTxId
        - assetType
    GetKYCApplicationResponse:
      description: |
        Get Onboarding KYC Application Response
      type: object
      properties:
        data:
          $ref: '#/components/schemas/KYCApplication'
      title: GetKYCApplicationResponse
    KYCApplication:
      description: |
        Onboarding KYC Application
      type: object
      properties:
        customerId:
          description: Unique identifier for the customer onboarding application
          type: string
        entries:
          description: A collection of responses for a set of defined relevant questions.
          type: array
          items:
            $ref: '#/components/schemas/KYCApplicationEntry'
        errors:
          description: A collection of errors validating the responses.
          type: array
          items:
            $ref: '#/components/schemas/KYCApplicationError'
        status:
          description: 'Status of the onboarding application, possible status are DRAFT, IN_PROGRESS, IN_REVIEW and COMPLETE'
          type: string
      required:
        - customerId
        - entries
        - status
      title: KYCApplication
    GetKYCAffiliatesResponse:
      description: |
        Get Onboarding KYC Customer Applications Response
      type: object
      properties:
        data:
          type: array
          items:
            $ref: '#/components/schemas/KYCAffiliate'
        page:
          $ref: '#/components/schemas/Page'
      title: GetKYCAffiliatesResponse
    KYCAffiliate:
      description: |
        Onboarding KYC Customer Applications
      type: object
      properties:
        customerId:
          description: Unique identifier for the customer onboarding application
          type: string
        customerType:
          description: The type of customer
          type: string
        name:
          description: A name of the customer
          type: string
        status:
          description: Status of the onboarding application
          type: string
      required:
        - customerId
        - status
        - name
        - customerType
      title: KYCAffiliate
    CreateKYCApplicationRequest:
      type: object
      properties:
        applicationType:
          description: 'Anchorage Digital provided type of application, RIA_PC_INDIVIDUAL to Onboard RIA Program Customer who is an Individual and RIA_PC_INSTITUTION to Onboard RIA Program Customer that is an Institution.'
          type: string
          example: RIA_PC_INSTITUTION
          enum:
            - RIA_PC_INSTITUTION
            - RIA_PC_INDIVIDUAL
        applicationVersion:
          description: 'Anchorage Digital version of the application. By default, this value is 0.'
          type: integer
          format: int32
          default: 0
        entries:
          description: A collection of responses for a set of defined relevant questions.
          type: array
          items:
            $ref: '#/components/schemas/KYCApplicationEntry'
        externalId:
          description: External identifier for the customer onboarding application. This value has to be unique for each customer application.
          type: string
        submit:
          description: Optional parameter to try to submit the application if there are no validation errors. This action is irreversible you cannot update the application values after. You can use this to avoid making another api call to POST /v2/onboarding/customers/submit
          type: boolean
      required:
        - entries
      title: CreateKYCApplicationRequest
    CreateKYCApplicationResponse:
      type: object
      properties:
        data:
          $ref: '#/components/schemas/CreateKYCApplicationResponseData'
      required:
        - data
      title: CreateKYCApplicationResponse
    CreateKYCApplicationResponseData:
      type: object
      properties:
        customerId:
          description: Unique identifier for the customer onboarding application
          type: string
        id:
          description: DEPRECATED - Use customerId instead
          type: string
        status:
          description: 'Status of the customer onboarding application, possible values are  DRAFT, IN_PROGRESS, IN_REVIEW and COMPLETE'
          type: string
      required:
        - customerId
        - status
      title: CreateKYCApplicationResponseData
    KYCApplicationError:
      type: object
      properties:
        key:
          description: Identifier of the question.
          type: string
        status:
          description: Answer error for this type of question.
          type: string
          enum:
            - MISSING
            - BADFORMAT
            - UNSIGNED
        value:
          description: Error message.
          type: string
      required:
        - key
        - status
      title: KYCApplicationError
    CreateKYCDocumentRequest:
      type: object
      properties:
        documentType:
          description: Type of document to upload.
          type: string
      required:
        - documentType
      title: CreateKYCDocumentRequest
    CreateKYCDocumentResponse:
      type: object
      properties:
        data:
          $ref: '#/components/schemas/CreateKYCDocumentResponseData'
      required:
        - data
      title: CreateKYCDocumentResponse
    CreateKYCDocumentResponseData:
      type: object
      properties:
        url:
          description: URL to use for document upload
          type: string
      required:
        - url
      title: CreateKYCDocumentResponseData
    PerformDepositAttributionRequest:
      type: object
      properties:
        notes:
          description: Additional notes for the deposit attribution.
          type: string
          example: US
        originatorCountry:
          description: 'The country code ([ISO 3166-1 alpha-2](https://www.iso.org/iso-3166-country-codes.html)) of the originator of this deposit. This field is required in order to perform an attribution.'
          type: string
          example: US
          maxLength: 2
          minLength: 2
        originatorName:
          description: The name of the originator of this deposit. This field is required in order to perform an attribution.
          type: string
          example: John Doe
          minLength: 1
        sourceWalletType:
          description: |
            The type of wallet being used by the deposit originator:

             * `CUSTODIAL` - The wallet owner does not have complete control over the wallet as they do not have the private key; a third party does. This key is needed to conduct transfers. Examples of custodial wallets include: Binance, Coinbase, Kraken, and Bitgo.
             * `SELF_HOSTED` - The wallet owner has complete control over the wallet as they have the private key. Examples of self-hosted wallets include: Metamask, Trust Wallet, Ledger Nano X, Trezor One, Electrum, Exodus, and Phantom.

             This field is required in order to perform an attribution.
          type: string
          example: CUSTODIAL
          enum:
            - CUSTODIAL
            - SELF_HOSTED
          minLength: 1
      required:
        - originatorName
        - originatorCountry
        - sourceWalletType
    PerformDepositAttributionResponse:
      type: object
      properties:
        data:
          type: object
          properties:
            depositTransactionId:
              description: The transactionId where the transactionType is `DEPOSIT`.
              type: string
              example: 0e2b2f9d-8d10-4f1e-960b-28567255045f
            status:
              description: The confirmation status once the attribution is performed.
              type: string
              enum:
                - UNDER_REVIEW
    SNSettlementProposal:
      type: object
      properties:
        acceptorId:
          type: string
        applyPostLock:
          description: 'Conditional. This parameter is only applicable for clients utilizing Atlas settlements integrated with "Anchorage Vesting". When set to true, it enables the automatic creation of post-settlement vesting schedules. Note: Enabling this will place indefinite holds on the acceptor''s destination wallets immediately following a successful settlement'
          type: boolean
        clientReferenceId:
          description: 'An ID, set by the proposer, visible to both sides, to uniquely identify the purpose of the settlement so that both sides can account for it correctly.'
          type: string
        idempotentId:
          type: string
          maxLength: 128
        proposerId:
          type: string
        useGasStation:
          description: Option to request to use Gas Station to cover fees for proposer.
          type: boolean
        vaultId:
          description: The vault ID of the proposer. It needs to match the vault that the wallets are in.
          type: string
        walletAmounts:
          description: 'In a proposal, each asset type can appear only once in the wallet amount list.'
          type: array
          items:
            $ref: '#/components/schemas/SNWalletAmount'
      required:
        - proposerId
        - acceptorId
        - idempotentId
        - vaultId
        - walletAmounts
    SNWalletAmount:
      type: object
      properties:
        assetType:
          description: |-
            A string representing a type of crypto-asset, which usually corresponds to the crypto asset's ticker symbol.
            Use `/asset-types` to list all of the supported asset types for your organization.
          type: string
          example: BTC
        quantity:
          description: 'The numeric value of this amount, excluding units. Use positive numbers for receiving and negative for sending assets. Amounts never include fees.'
          type: string
          example: '10.45234733'
        walletId:
          type: string
      required:
        - assetType
        - quantity
    SNProposeSettlementResponse:
      type: object
      properties:
        settlementId:
          type: string
      required:
        - settlementId
    SNSettlementAuthorization:
      type: object
      properties:
        acceptorId:
          type: string
        proposerId:
          type: string
        walletAmounts:
          description: 'In a proposal, each asset type can appear only once in the wallet amount list.'
          type: array
          items:
            $ref: '#/components/schemas/SNWalletAmount'
      required:
        - proposerId
        - acceptorId
        - walletAmounts
    SNAcceptSettlementRequest:
      type: object
      properties:
        useGasStation:
          description: Option to request to use Gas Station to cover fees for acceptor.
          type: boolean
        vaultId:
          description: ID of vault to use for the settlement
          type: string
        walletAmounts:
          description: 'The set of wallets to use for the requested walletAmounts. The assets must match exactly the list of assets in the proposal and the amounts must be exactly opposite the amounts in the proposal. Use positive numbers to describe assets to receive and negative to send. The sum of the amounts, by asset type, must match the negative of the sum of the amounts on the proposer''s side of the settlement. The special string `createWallet` can be used to indicate that a new wallet should be created for this asset for this settlement.'
          type: array
          items:
            $ref: '#/components/schemas/SNWalletAmount'
      required:
        - vaultId
        - walletAmounts
    SNSettlementsResponse:
      type: object
      properties:
        data:
          type: array
          items:
            $ref: '#/components/schemas/SNSettlement'
        page:
          $ref: '#/components/schemas/Page'
      required:
        - data
        - page
    SNSettlementResponse:
      type: object
      properties:
        settlement:
          $ref: '#/components/schemas/SNSettlement'
      required:
        - settlement
    SNSettlement:
      description: |-
        A settlement is a proposal to move assets between wallets owned by two participants.

        When the settlement status is `ActionNeeded`, refer to your participant's settlement side (`proposerSide` or `acceptorSide`) for more detailed information. Fields on the settlement side reflect the individual actions needed.
      type: object
      properties:
        acceptorSide:
          $ref: '#/components/schemas/SNSettlementSide'
        clientReferenceId:
          description: 'An ID, set by the proposer, visible to both sides, to uniquely identify the purpose of the settlement so that both sides can account for it correctly.'
          type: string
        pendingAcceptorReview:
          description: a flag indicating whether the settlement is awaiting acceptor selection
          type: boolean
        proposerSide:
          $ref: '#/components/schemas/SNSettlementSide'
        settlementId:
          type: string
        state:
          $ref: '#/components/schemas/SNSettlementState'
      required:
        - settlementId
        - proposerSide
        - acceptorSide
        - state
        - clientReferenceId
        - pendingAcceptorReview
    SNSettlementState:
      type: string
      enum:
        - ActionNeeded
        - CounterpartyActionNeeded
        - Executing
        - TimedOut
        - Rejected
        - Executed
        - Failed
    SNSettlementSide:
      type: object
      properties:
        authorized:
          description: This can be null if authorization is not required or if the caller doesn't have access to this information.
          type: boolean
        feesFunded:
          description: 'This can be null if the caller doesn''t have access to this information. Fees funded status is based on the same fee logic as transfers and is checked independently of any other settlements. It takes into account only the current available balance for the relevant wallet. If the primary amount and fee amount are the of same asset, the primary amount is also taken into account when calculating this.'
          type: boolean
        funded:
          description: This can be null if the caller doesn't have access to this information. The funded status does not include fees and is checked independently of any other settlements. It takes into account only the current available balance for the relevant wallet.
          type: boolean
        gasStationEnabled:
          description: Indicates the Gas Station is enabled to cover fees for this participant. This can be null if the caller doesn't have access to this information.
          type: boolean
        participantId:
          type: string
        walletAmounts:
          type: array
          items:
            $ref: '#/components/schemas/SNWalletAmount'
      required:
        - participantId
    SNTrustedCounterpartyProposal:
      type: object
      properties:
        counterpartyId:
          type: string
        description:
          type: string
        idempotentId:
          type: string
          maxLength: 128
        participantId:
          type: string
      required:
        - participantId
        - counterpartyId
        - idempotentId
    SNTrustedCounterpartyResponse:
      type: object
      properties:
        counterparty:
          $ref: '#/components/schemas/SNTrustedCounterparty'
      required:
        - counterparty
    SNTrustedCounterpartiesResponse:
      type: object
      properties:
        data:
          type: array
          items:
            $ref: '#/components/schemas/SNTrustedCounterparty'
        page:
          $ref: '#/components/schemas/Page'
      required:
        - data
        - page
    SNTrustedCounterparty:
      type: object
      properties:
        counterpartyId:
          type: string
        counterpartyName:
          type: string
        description:
          type: string
        isActive:
          type: boolean
      required:
        - counterpartyId
        - counterpartyName
        - isActive
    SNParticipantResponse:
      type: object
      properties:
        participant:
          $ref: '#/components/schemas/SNParticipant'
      required:
        - participant
    SNParticipant:
      type: object
      properties:
        isActive:
          type: boolean
        participantId:
          type: string
        participantName:
          type: string
        tier:
          $ref: '#/components/schemas/SNParticipantTier'
      required:
        - participantId
        - participantName
        - isActive
    SNParticipantTier:
      type: string
      enum:
        - Basic
        - Advanced
    SNParticipantsResponse:
      type: object
      properties:
        data:
          type: array
          items:
            $ref: '#/components/schemas/SNParticipant'
        page:
          $ref: '#/components/schemas/Page'
      required:
        - data
        - page
    SettlementResponse:
      type: object
      properties:
        data:
          $ref: '#/components/schemas/SettlementDetails'
      required:
        - data
      title: SettlementResponse
    StablecoinConversion:
      type: object
      properties:
        amount:
          type: string
        destinationAssetType:
          description: |-
            A string representing the asset used for this operation. For issuance, this value must be the stablecoin asset. For redemptions, it must be USD.
            Use `/asset-types` to list all supported asset types for your organization.
          type: string
          example: USDX
        destinationWalletId:
          type: string
        idempotencyKey:
          description: Client-provided idempotency key to ensure request is processed only once
          type: string
          example: e763a50d-aa82-4ec7-b5a3-89ad0462d248
          maxLength: 128
        sourceAssetType:
          description: |-
            A string representing the asset used for this operation. For issuance, this value must be USD. For redemptions, it must be the asset being redeemed.
            Use `/asset-types` to list all supported asset types for your organization.
          type: string
          example: USD
        sourceWalletId:
          type: string
      required:
        - idempotencyKey
        - sourceWalletId
        - sourceAssetType
        - destinationWalletId
        - destinationAssetType
        - amount
    StablecoinConversionResponse:
      type: object
      properties:
        authorizationOperationId:
          type: string
      required:
        - authorizationOperationId
    IssueRedeemConversion:
      type: object
      properties:
        amount:
          description: Amount as a decimal string
          type: string
          example: '100.00'
        authorizationOperationId:
          description: Authorization operation ID (if present)
          type: string
          nullable: true
          x-omitempty: false
        createdAt:
          description: When the operation was created
          type: string
          format: date-time
        destinationAssetTypeId:
          description: Destination asset type
          type: string
          example: PYUSD
        destinationOperationId:
          description: 'Identifier of the destination-leg customer operation (if present). Pass to `GET /transactions/{transactionId}` for full details.'
          type: string
          nullable: true
          x-omitempty: false
        destinationWalletId:
          description: Destination wallet ID
          type: string
        id:
          description: Unique identifier for the issue/redeem operation
          type: string
        operationType:
          description: 'Type of operation (ISSUE, REDEEM, BRIDGE, or SWAP)'
          type: string
          example: ISSUE
        sourceAssetTypeId:
          description: Source asset type
          type: string
          example: USD
        sourceOperationId:
          description: 'Identifier of the source-leg customer operation (if present). Pass to `GET /transactions/{transactionId}` for full details.'
          type: string
          nullable: true
          x-omitempty: false
        sourceWalletId:
          description: Source wallet ID
          type: string
        status:
          description: |-
            Customer-facing conversion status.
            * `INITIATED` — conversion has started and is awaiting endorsements.
            * `EXECUTING` — endorsements approved; conversion is pending.
            * `COMPLETED` — conversion was fulfilled successfully.
            * `FAILED` — conversion failed (see `subStatus` when the customer can already observe the cause).
            * `UNKNOWN` — unrecognised internal state (forward-compatibility fallback).
          type: string
          example: EXECUTING
          enum:
            - INITIATED
            - EXECUTING
            - COMPLETED
            - FAILED
            - UNKNOWN
          x-enum-varnames:
            - IssueRedeemConversionStatusINITIATED
            - IssueRedeemConversionStatusEXECUTING
            - IssueRedeemConversionStatusCOMPLETED
            - IssueRedeemConversionStatusFAILED
            - IssueRedeemConversionStatusUNKNOWN
        subStatus:
          description: |-
            Optional sub-status that further qualifies the top-level `status`. Only set for outcomes
            the customer can independently observe; internal failure modes are not disclosed.
            * `REJECTED_BY_CUSTOMER` — the customer rejected the conversion before endorsement approval (paired with `status: FAILED`).
          type: string
          enum:
            - REJECTED_BY_CUSTOMER
          nullable: true
          x-enum-varnames:
            - IssueRedeemConversionSubStatusREJECTEDBYCUSTOMER
          x-omitempty: false
      required:
        - id
        - operationType
        - sourceWalletId
        - destinationWalletId
        - destinationAssetTypeId
        - sourceAssetTypeId
        - amount
        - status
        - createdAt
    IssueRedeemHistoryResponse:
      type: object
      properties:
        data:
          type: array
          items:
            $ref: '#/components/schemas/IssueRedeemConversion'
        page:
          $ref: '#/components/schemas/Page'
      required:
        - data
        - page
    ReservesHistoryResponse:
      type: object
      properties:
        data:
          type: array
          items:
            $ref: '#/components/schemas/ReservesSnapshot'
        page:
          $ref: '#/components/schemas/Page'
      required:
        - data
        - page
    ReservesSnapshot:
      type: object
      properties:
        createdAt:
          description: RFC3339 row write time; pagination cursor field.
          type: string
          format: date-time
        inTransit:
          description: 'In-transit cash, as a decimal string. Already reflected in reserveComposition and totalReserves; broken out separately for visibility. Do not re-add to the total.'
          type: string
          example: '100.00'
        reportDate:
          description: Reconciliation date (YYYY-MM-DD).
          type: string
          format: date
        reserveComposition:
          $ref: '#/components/schemas/ReserveComposition'
        reserveRatio:
          description: 'totalReserves / totalStablecoinOnNetwork, as a decimal string.'
          type: string
          example: '1.00010'
        stablecoin:
          description: Token symbol.
          type: string
          example: USDX
        totalReserves:
          description: 'Total reserves, as a decimal string.'
          type: string
          example: '10000'
        totalStablecoinOnNetwork:
          description: 'Total supply on-network, as a decimal string.'
          type: string
          example: '9999'
      required:
        - reportDate
        - stablecoin
        - totalStablecoinOnNetwork
        - totalReserves
        - reserveRatio
        - reserveComposition
        - inTransit
        - createdAt
      title: Reserves Snapshot
    ReserveComposition:
      description: |-
        Reserve backing for the queried token, as a map of reserve-component key to balance.

        Each value is a decimal string. The set of keys is not fixed; it varies by token and may gain new keys over time, so iterate over whatever keys are present and ignore any you do not recognize. Existing keys are stable and will not be renamed or removed without a new API version.
      type: object
      example:
        cashDeposits: '5000.00'
        mmfXyz: '5000.00'
      additionalProperties:
        type: string
      title: Reserve Composition
    StablecoinReservesEntitledStablecoinsResponse:
      type: object
      properties:
        data:
          $ref: '#/components/schemas/EntitledStablecoins'
      required:
        - data
    EntitledStablecoins:
      type: object
      properties:
        stablecoins:
          description: Stablecoin token symbols your organization is entitled to query reserves history for.
          type: array
          items:
            type: string
      required:
        - stablecoins
    StatementType:
      type: object
      properties:
        id:
          type: string
          example: b00e2483-57a1-4db4-8ea1-b91223a76a20
        name:
          type: string
          example: Brokerage Monthly Statement
      required:
        - id
        - name
    Statement:
      type: object
      properties:
        correctedAt:
          description: The time the statement was corrected. This field may be omitted if the statement has not been corrected
          type: string
          format: date-time
          example: '2019-01-02T12:34:56.000Z'
          nullable: true
        createdAt:
          type: string
          format: date-time
          example: '2019-01-02T12:34:56.000Z'
        customerId:
          type: string
          example: 1ac10949bbbf483e8df3c0f8ef97146bc9ce6f5890df40fa8777ea63dc932f7b
        displayName:
          type: string
          example: September 2025 Statement
        id:
          type: string
          example: 3486b413-93d3-4447-afce-2b9c9dc34a32
        typeId:
          type: string
          example: 058da362-31a7-4e2b-ae3e-77b095389a5f
      required:
        - id
        - typeId
        - createdAt
        - displayName
    StatementDetails:
      type: object
      properties:
        correctedAt:
          description: The time the statement was corrected. This field may be omitted if the statement has not been corrected
          type: string
          format: date-time
          example: '2019-01-02T12:34:56.000Z'
          nullable: true
        createdAt:
          type: string
          format: date-time
          example: '2019-01-02T12:34:56.000Z'
        customerId:
          type: string
          example: 1ac10949bbbf483e8df3c0f8ef97146bc9ce6f5890df40fa8777ea63dc932f7b
        displayName:
          type: string
          example: September 2025 Statement
        id:
          type: string
          example: 8de0fc33-7443-4dcf-bbf1-4ca8d0e0509f
        typeId:
          type: string
          example: 058da362-31a7-4e2b-ae3e-77b095389a5f
      required:
        - id
        - typeId
        - createdAt
        - displayName
    SubaccountWalletResponse:
      type: object
      properties:
        networkId:
          type: string
        walletId:
          type: string
      title: SubaccountWalletReponse
    BankInfoResponse:
      type: object
      properties:
        data:
          type: object
          properties:
            bank:
              description: Bank name
              type: string
            bankAccountNr:
              description: Bank Account Number
              type: string
            bankAddress:
              description: Bank Address
              type: string
            bankRoutingNr:
              description: Bank Routing Number
              type: string
              pattern: '^\d{9}$'
            bankSwiftCode:
              description: Bank Swift Code
              type: string
            beneficiaryAddress:
              description: Beneficiary Address
              type: string
            beneficiaryName:
              description: Beneficiary Name
              type: string
            memo:
              description: Memo field to use on a Wire deposit
              type: string
      title: BankInfoResponse
    SubaccountType:
      description: Type of the subaccount
      type: string
      enum:
        - IRA
        - ROTH
        - JOINT
        - CUSTODIAL
        - INDIVIDUAL_TAXABLE
        - INSTITUTIONAL_TAXABLE
    SubaccountStatus:
      description: Status of the subaccount
      type: string
      enum:
        - OPEN
        - CLOSED
        - SUBMITTED
    SubaccountSubType:
      description: 'SubType of the subaccount, may not always apply'
      type: string
      enum:
        - ROLLOVER
        - CONVERSION
    CreateSubaccountRequest:
      description: Details of the subaccount to open for the program customer
      type: object
      properties:
        externalSubaccountId:
          description: The external unique identifier you wish to use to identify this subaccount.
          type: string
        fees:
          description: List of fees applied to the subaccount. All fees need to be defined.
          type: array
          items:
            $ref: '#/components/schemas/CreateFeeDetailType'
        name:
          description: The name of the subaccount. Needs to be unique per program customer.
          type: string
      example:
        name: Subaccount Name
        externalSubaccountId: EXTERNAL_ID_001
        fees:
          - type: ADVISORY
            rate: 0.01
          - type: MODEL
            rate: 0.01
            isBillable: false
          - type: MANAGEMENT
            rate: 0.01
      required:
        - externalSubaccountId
        - fees
        - name
      title: CreateSubaccountRequest
    CreateSubaccountResponse:
      type: object
      properties:
        data:
          $ref: '#/components/schemas/SubaccountIdResponse'
      required:
        - data
      title: CreateSubaccountResponse
    SubaccountIdResponse:
      type: object
      properties:
        subaccountId:
          description: Unique Identifier for the subaccount
          type: string
          example: ec761b5e-fd2c-497a-a9a0-f8738ac97bdf
      required:
        - subaccountId
      title: SubaccountIdResponse
    TaxAccountsResponse:
      type: object
      properties:
        data:
          type: array
          items:
            $ref: '#/components/schemas/TaxAccount'
        page:
          $ref: '#/components/schemas/Page'
      required:
        - data
        - page
    TaxAccount:
      description: A tax account for the organization
      type: object
      properties:
        createdAt:
          description: ISO-8601 timestamp when the account was created
          type: string
          format: date-time
          example: '2022-07-30T22:15:31.99999Z'
        id:
          description: The unique identifier of the tax account
          type: string
          example: acc_9cd9f4d4-078b-4e44-a308-7662fec0f546
        name:
          description: The name of the tax account
          type: string
          example: Main Trading Account
      required:
        - id
        - name
        - createdAt
    TaxAccountTransactionsResponse:
      type: object
      properties:
        data:
          type: array
          items:
            $ref: '#/components/schemas/TaxAccountTransaction'
        page:
          $ref: '#/components/schemas/Page'
      required:
        - data
        - page
    TaxAccountTransaction:
      description: Details of an external transaction into Anchorage Digital
      type: object
      properties:
        assetType:
          description: The asset type of this transaction.
          type: string
          example: BTC
        externalId:
          description: The unique identifier in an external system
          type: string
          example: 9be748be-d760-4d36-90f8-86b699c4e8bd
        id:
          description: The unique identifier of the transaction
          type: string
          example: 9cd9f4d4-078b-4e44-a308-7662fec0f546
        receivedAssets:
          description: Assets received with cost basis information. Supports multiple lots for the same asset with different acquisition dates/costs.
          type: array
          items:
            $ref: '#/components/schemas/TaxTransactionLot'
        transactionTime:
          description: ISO-8601 timestamp when the transaction occurred
          type: string
          format: date-time
          example: '2022-07-30T22:15:31.99999Z'
      required:
        - id
        - assetType
        - receivedAssets
        - transactionTime
    TaxTransactionLot:
      description: 'A tax lot, representing an asset quantity with its associated cost basis and acquisition date'
      type: object
      properties:
        acquisitionDatetime:
          description: ISO-8601 timestamp representing when this lot was originally acquired
          type: string
          format: date-time
        costBasis:
          description: The cost basis of this lot.
          type: string
          example: '2500'
        quantity:
          description: The quantity of this lot.
          type: string
          example: '1.0'
      required:
        - quantity
    TaxTransactionUpdateCostBasisRequest:
      description: Request to update cost basis for a transaction
      type: object
      properties:
        lots:
          description: 'An array of tax lots that are part of this transaction. Each lot specifies the quantity, cost basis and the acquisition date.'
          type: array
          items:
            $ref: '#/components/schemas/TaxTransactionInputLot'
          minItems: 1
          uniqueItems: true
      required:
        - lots
    TaxTransactionInputLot:
      description: 'A tax lot in a cost basis update request, with required cost basis'
      allOf:
        - $ref: '#/components/schemas/TaxTransactionLot'
        - required:
            - costBasis
            - acquisitionDatetime
    TaxTransactionUpdateCostBasisResponse:
      description: Response after updating transaction cost basis
      type: object
      properties:
        data:
          $ref: '#/components/schemas/TaxTransactionUpdateCostBasisResponseId'
      required:
        - data
    TaxTransactionUpdateCostBasisResponseId:
      description: Response data containing transaction ID
      type: object
      properties:
        transactionId:
          description: The unique identifier of the transaction
          type: string
          example: 9cd9f4d4-078b-4e44-a308-7662fec0f546
      required:
        - transactionId
    TradingAccount:
      type: object
      properties:
        enabled:
          description: Enabled state of the trading account
          type: boolean
        id:
          description: An ID uniquely identifying the trading account
          type: string
          example: 6290d9bd-494f-11ed-975e-2e567b4c0e09
        name:
          description: Name of the trading account
          type: string
          example: Crypto Fund LLC
      required:
        - id
        - name
        - enabled
      title: TradingAccount
    TradingAccountResponse:
      type: object
      properties:
        data:
          $ref: '#/components/schemas/TradingAccount'
      required:
        - data
      title: TradingAccountResponse
    TradingAccountsResponse:
      type: object
      properties:
        data:
          type: array
          items:
            $ref: '#/components/schemas/TradingAccount'
          minItems: 0
          uniqueItems: true
      required:
        - data
      title: TradingAccountsResponse
    TradingAccountBalanceResponse:
      type: object
      properties:
        data:
          type: array
          items:
            $ref: '#/components/schemas/TradingAccountBalance'
      required:
        - data
      title: TradingAccountBalanceResponse
    TradingAccountBalance:
      type: object
      properties:
        balance:
          $ref: '#/components/schemas/Amount'
      title: TradingAccountBalance
    TradingAccountCreditResponse:
      type: object
      properties:
        data:
          $ref: '#/components/schemas/TradingAccountCredit'
      required:
        - data
      title: TradingAccountCreditResponse
    TradingAccountCredit:
      type: object
      properties:
        limits:
          type: array
          items:
            $ref: '#/components/schemas/Amount'
          minItems: 0
          uniqueItems: true
        usage:
          type: array
          items:
            $ref: '#/components/schemas/Amount'
          minItems: 0
          uniqueItems: true
      title: TradingAccountCredit
    OrderAllocation:
      type: object
      properties:
        quantity:
          description: Quantity to allocate to the subaccount
          type: string
          example: '10000'
        specLotId:
          description: 'Optional specification lot ID for tax reporting purposes, scoped to this allocation. Only applicable for SELL orders with timeInForce FOK. When provided, instructs the tax service to retire the specified lot for this allocation''s portion of the trade. Mutually exclusive with the order-level specLotId.'
          type: string
          example: 550e8400-e29b-41d4-a716-446655440000
        subaccountId:
          description: The Subaccount Identifier
          type: string
      required:
        - subaccountId
        - quantity
      title: OrderAllocation
    Allocation:
      type: object
      properties:
        counterQtyAllIn:
          description: Counter quantity all in
          type: string
          example: '10000'
        counterQtyAllInToSettle:
          description: Counter quantity all in to be settled
          type: string
          example: '10000'
        cumQty:
          description: Filled quantity
          type: string
          example: '10000'
        executionId:
          description: Execution identifier
          type: string
          example: 6290d9bd-494f-11ed-975e-2e567b4c0e09
        fee:
          description: Fee
          type: string
          example: '10000'
        quantity:
          description: Allocated quantity
          type: string
          example: '10000'
        specLotId:
          description: The specification lot ID applied to this allocation. Present only for allocations that carried an allocation-scoped specLotId.
          type: string
          example: 550e8400-e29b-41d4-a716-446655440000
        subaccountId:
          description: The Subaccount Identifier
          type: string
          example: 905272f0-52f9-404e-b6cd-ad879e671790
      required:
        - subaccountId
        - quantity
        - counterQtyAllIn
        - counterQtyAllInToSettle
        - fee
        - cumQty
      title: Allocation
    SettlementInstructionsCrypto:
      type: object
      properties:
        address:
          description: Settlement address.
          type: string
        assetTypeID:
          description: Asset type identifier.
          type: string
      required:
        - assetTypeID
        - address
      title: SettlementInstructionsCrypto
    SettlementDetails:
      type: object
      properties:
        account:
          description: The account into which this trade will be settled
          type: object
          properties:
            accountId:
              description: An ID uniquely identifying the trading account
              type: string
              example: 6290d9bd-494f-11ed-975e-2e567b4c0e09
          title: Account
        createdAt:
          description: 'The system timestamp when this settlement was created, as an ISO-8601 UTC string of the form 2019-02-13T05:17:32.000000Z.'
          type: string
        instructionsCrypto:
          description: Set of settlement instructions in crypto currencies.
          type: array
          items:
            $ref: '#/components/schemas/SettlementInstructionsCrypto'
          nullable: true
        positions:
          description: A list of positions for that Settlement
          type: array
          items:
            $ref: '#/components/schemas/TradingPosition'
          nullable: true
        settlementID:
          description: Unique ID for this settlement.
          type: string
        settlementStatus:
          $ref: '#/components/schemas/SettlementStatus'
        settlementType:
          $ref: '#/components/schemas/SettlementType'
        vault:
          description: The vault into which this trade will be settled
          type: object
          properties:
            vaultID:
              description: An ID uniquely identifying the vault
              type: string
              example: 1c920f4241b78a1d483a29f3c24b6c4c
          title: Vault
      required:
        - createdAt
        - settlementStatus
        - settlementID
      title: SettlementDetails
    SettlementsResponse:
      type: object
      properties:
        data:
          type: array
          items:
            $ref: '#/components/schemas/SettlementDetails'
        page:
          $ref: '#/components/schemas/Page'
      required:
        - data
        - page
      title: SettlementsResponse
    Quote:
      type: object
      properties:
        bidAmount:
          $ref: '#/components/schemas/Amount'
        bidPrice:
          description: Bid quote price
          type: string
          example: '29284.47'
        offerAmount:
          $ref: '#/components/schemas/Amount'
        offerPrice:
          description: Offer quote price
          type: string
          example: '29284.47'
        quoteID:
          description: ID of this quote.
          type: string
        quoteRequest:
          $ref: '#/components/schemas/GetQuoteRequest'
        quoteStatus:
          $ref: '#/components/schemas/QuoteStatus'
        timestamp:
          description: 'The time this quote was procured. An ISO-8601 UTC string of the form 2019-02-13T05:17:32.000000Z.'
          type: string
          format: date-time
          example: '2019-02-13T05:17:32.000000Z'
        validUntilTime:
          description: 'The expire time of the quote (optional). An ISO-8601 UTC string of the form 2019-02-13T05:17:32.000000Z.'
          type: string
          format: date-time
          example: '2019-01-02T12:34:56.000Z'
          nullable: true
      required:
        - quoteID
        - quoteRequest
        - quoteStatus
        - timestamp
      title: Quote
    TradeAccount:
      description: The account into which this trade will be settled
      type: object
      properties:
        accountId:
          description: An ID uniquely identifying the trading account
          type: string
          example: 6290d9bd-494f-11ed-975e-2e567b4c0e09
        subaccountId:
          description: An ID uniquely identifying the subaccount where applicable
          type: string
          example: 5490d9bd-494f-11ed-975e-2e567b4c0e09
      title: Account
    TradeDetails:
      type: object
      properties:
        account:
          $ref: '#/components/schemas/TradeAccount'
        currencyBought:
          description: The bought currency.
          type: string
        currencySold:
          description: The sold currency.
          type: string
        fee:
          description: Amount of the trade fee. It is filled asynchronously and might take up to 2 minutes to become available.
          type: string
        feeCurrency:
          description: Currency of the trade fee.
          type: string
        grossPrice:
          description: |
            Price in counter currency for **one unit** of the base currency, before Anchorage Digital trade fees are applied. This is the raw quoted exchange rate the trade was priced at, prior to the fee markup reflected in `price`.

            It is filled asynchronously and might take up to 2 minutes to become available, following the same timing as `price`.
          type: string
        grossQtyBought:
          description: 'Gross quantity bought in units of currencyBought, before Anchorage Digital trade fees are applied. It is filled asynchronously and might take up to 2 minutes to become available, following the same timing as "price".'
          type: string
        grossQtySold:
          description: 'Gross quantity sold in units of currencySold, before Anchorage Digital trade fees are applied. It is filled asynchronously and might take up to 2 minutes to become available, following the same timing as "price".'
          type: string
        orderId:
          description: Unique order ID for this trade.
          type: string
        price:
          description: |
            Price in counter currency for **one unit** of the base currency. For example, in the trading pair BTC-USD, this is the price in USD for one unit of BTC. It includes Anchorage Digital trade fees and represents the exchange rate at which the trade was executed.

            It is filled asynchronously and might take up to 2 minutes to become available. Once filled, the value will remain unchanged through all the other tradeStatus (`EXECUTED`, `SETTLING`, `SETTLED`, and `CANCELED`)
          type: string
        quantityBought:
          description: Quantity bought in units of currencyBought. It represents the quantity Anchorage Digital owes you. See "price" for details when this field is filled.
          type: string
        quantityBoughtToSettle:
          description: Rounded bought quantity that will considered at settlement. Filled out only in the context of a settlement.
          type: string
          x-omitempty: true
        quantitySold:
          description: Quantity sold in units of currencySold. It represents the quantity you owe Anchorage Digital. See "price" for details when this field is filled.
          type: string
        quantitySoldToSettle:
          description: Rounded sold quantity that will considered at settlement. Filled out only in the context of a settlement.
          type: string
          x-omitempty: true
        quoteID:
          description: Unique quote ID for this trade.
          type: string
        side:
          description: 'Side for the trade, either "BUY" or "SELL".'
          type: string
          example: BUY
          enum:
            - BUY
            - SELL
        timestamp:
          description: 'The system timestamp when this trade was received, i.e. when the quote was accepted, as an ISO-8601 UTC string of the form 2019-02-13T05:17:32.000000Z.'
          type: string
        tradeID:
          description: Unique ID for this trade.
          type: string
        tradeStatus:
          $ref: '#/components/schemas/TradeStatus'
        tradingPair:
          description: Pair of assets this trade is for.
          type: string
        vault:
          description: The vault into which this trade will be settled
          type: object
          properties:
            vaultID:
              description: An ID uniquely identifying the vault
              type: string
              example: 1c920f4241b78a1d483a29f3c24b6c4c
          title: Vault
      required:
        - timestamp
        - tradingPair
        - side
        - currencyBought
        - quantityBought
        - currencySold
        - quantitySold
        - tradeStatus
        - tradeID
        - quoteID
      title: TradeDetails
    TradesResponse:
      type: object
      properties:
        data:
          type: array
          items:
            $ref: '#/components/schemas/TradeDetails'
        page:
          $ref: '#/components/schemas/Page'
      required:
        - data
        - page
      title: TradesResponse
    TradesBySettlementResponse:
      type: object
      properties:
        data:
          type: array
          items:
            $ref: '#/components/schemas/TradeDetails'
        page:
          $ref: '#/components/schemas/Page'
      required:
        - data
        - page
      title: TradesResponse
    TradeResponse:
      type: object
      properties:
        data:
          $ref: '#/components/schemas/TradeDetails'
      required:
        - data
      title: TradeResponse
    GetQuoteResponse:
      type: object
      properties:
        data:
          $ref: '#/components/schemas/Quote'
      required:
        - data
      title: GetQuoteResponse
    GetQuoteRequest:
      type: object
      properties:
        accountId:
          description: 'Account ID for quote, must match the accountId on [accept quote](#operation/acceptQuote).'
          type: string
          example: aaa44c42-5ad3-4108-b376-f78cd32f0543
          nullable: true
        currency:
          description: Currency of quantity.
          type: string
          example: USD
        idempotentId:
          description: 'A client-provided unique ID for idempotent requests (optional). If provided a value, the same idempotentId must be also provided to [accept quote](#operation/acceptQuote).'
          type: string
          example: 01944c42-5ad3-4108-b376-f78cd6ff0393
          maxLength: 128
          nullable: true
        quantity:
          description: Quantity to quote for in units of currency.
          type: string
          example: '100'
        quantityRounding:
          description: 'Optional boolean to specify if quantity should round to Anchorage Digital supported increments. If false or not specified, the request can be rejected if quantity has more precision than our published size increments. The rounding is done as a truncation of the extra fractional digits.'
          type: boolean
        side:
          description: 'Side of the quote request. "BUY", "SELL", or "TWOWAY".'
          type: string
          example: BUY
          enum:
            - BUY
            - SELL
            - TWOWAY
        tradingPair:
          description: Trading pair being quoted.
          type: string
          example: BTC-USD
      required:
        - tradingPair
        - quantity
        - currency
        - side
      title: GetQuoteRequest
    AcceptQuoteRequest:
      type: object
      properties:
        accountId:
          description: |
            The ID of a trading account. This field is used to specify the trading account into which assets should be settled.
          type: string
          example: 6290d9bd-494f-11ed-975e-2e567b4c0e09
        allowedSlippage:
          description: |
            The maximum slippage Anchorage Digital will consider when accepting this order, communicated in terms of actual value (i.e. "0.001" => 10bps). Must be greater than or equal to 0 and less than or equal to 0.002 (20bps).

            In order to illustrate how this setting works, as an example, we shall consider a commission of 10bps for a quote priced at 10000, and that we are about to accept this quote with an allowedSlippage of "0.0008" (8bps). Then, considering the market has moved away from the quoted price, one of the following two scenarios will be applicable:

            1) Best market price within allowedSlippage - fill the order at the spread off the market
              Best Market Price: 10007
              Trade Status: Executed
              Customer Execution Price: 10017.007

            2) Best market price outside of allowedSlippage - reject the order
              Best Market Price: 10009
              Trade Status: Rejected
          type: string
          example: '0.0005'
        idempotentId:
          description: 'A client-provided unique ID for idempotent requests (optional). This value must match the one provided to [request quote](#operation/requestQuote).'
          type: string
          example: 01944c42-5ad3-4108-b376-f78cd6ff0393
          maxLength: 128
          nullable: true
        quoteID:
          description: ID of the quote to trade.
          type: string
        side:
          description: 'Trade side, either "BUY" or "SELL".'
          type: string
          example: BUY
          enum:
            - BUY
            - SELL
        vaultID:
          description: |
            Currently in BETA.

            The ID of a vault. This optional field is used to specify the vault into which assets should be settled.
            If provided, the API key must have the following permissions: **Read vault activity**
          type: string
          example: 1c920f4241b78a1d483a29f3c24b6c4c
      required:
        - quoteID
        - side
        - accountId
      title: AcceptQuoteRequest
    AcceptQuoteResponseData:
      type: object
      properties:
        quoteID:
          description: ID of the quote to trade.
          type: string
        side:
          description: 'Trade side, either "BUY" or "SELL".'
          type: string
          example: BUY
          enum:
            - BUY
            - SELL
        tradeID:
          description: ID of the trade.
          type: string
        tradeStatus:
          $ref: '#/components/schemas/TradeStatus'
      required:
        - quoteID
        - side
        - tradeStatus
      title: AcceptQuoteResponseData
    AcceptQuoteResponse:
      type: object
      properties:
        data:
          $ref: '#/components/schemas/AcceptQuoteResponseData'
      required:
        - data
      title: AcceptQuoteResponse
    NewOrderSingle:
      type: object
      properties:
        accountId:
          description: Account ID for this order to book into.
          type: string
          example: 0e2b2f9d-8d10-4f1e-960b-28567255045f
        allocation:
          description: Order subaccount allocation
          type: array
          items:
            $ref: '#/components/schemas/OrderAllocation'
        clOrderId:
          description: Unique client order ID.
          type: string
          example: 6fb5fc79-0bb4-446d-82dd-d4687fb56a02
        currency:
          description: The currency in which order quantity is specified in.
          type: string
          example: BTC
        limitPrice:
          description: 'Limit price for the order, required for limit order'
          type: string
          example: '21005.5'
        orderType:
          description: Order type either MARKET or LIMIT
          type: string
          enum:
            - MARKET
            - LIMIT
            - RFQ
            - LIMIT_ALL_IN
        quantity:
          description: Order quantity in units of currency.
          type: string
          example: '100.00'
        side:
          description: 'Order side, either "BUY" or "SELL".'
          type: string
          enum:
            - BUY
            - SELL
        subaccountId:
          description: Subaccount ID for this order to book into.
          type: string
          example: 343b6c83-6d91-4f13-9982-2109abd2dbb0
        symbol:
          description: 'Symbol for the order, e.g. BTC-USD.'
          type: string
          example: BTC-USD
        timestamp:
          description: 'Timestamp when submitting this order. Date-times are always in UTC [RFC 3339](https://datatracker.ietf.org/doc/html/rfc3339#section-5.6) ''date-time''.'
          type: string
          format: date-time
      required:
        - clOrderId
        - symbol
        - side
        - currency
        - quantity
        - orderType
        - timestamp
      title: NewOrderSingle
    TradingOrderResponse:
      type: object
      properties:
        data:
          $ref: '#/components/schemas/OrderExecutionReport'
      required:
        - data
      title: TradingOrderResponse
    OrderExecutionReport:
      type: object
      properties:
        accountId:
          description: Account ID for this order to book into.
          type: string
          example: 0e2b2f9d-8d10-4f1e-960b-28567255045f
        allocation:
          description: Subaccount allocation
          type: array
          items:
            $ref: '#/components/schemas/Allocation'
          x-omitempty: true
        avgPx:
          description: Average filled price for this order.
          type: string
          example: '21005.4'
        avgPxAllIn:
          description: Average filled price + anchorage commission.
          type: string
          example: '21006.00'
        clOrderId:
          description: Original client order ID as submitted.
          type: string
          example: 6fb5fc79-0bb4-446d-82dd-d4687fb56a02
        counterCurrency:
          description: The counter currency of the order.
          type: string
          example: BTC
        counterQty:
          description: Filled quantity of the counter currency.
          type: string
          example: '0.001'
        counterQtyAllIn:
          description: Filled quantity of the counter currency including all fees.
          type: string
          example: '0.0012'
        cumQty:
          description: Cumulative filled quantity for this order.
          type: string
          example: '10000.00'
        currency:
          description: The currency in which order quantity is specified in.
          type: string
          example: USD
        execId:
          description: Execution ID of this report. This ID can be used to retrieve the trade.
          type: string
          example: 3fb532c79-0bb4-446d-82dd-d4687fb56a02
        fee:
          description: Commission charged for this order.
          type: string
          example: '10.0'
        feeCurrency:
          description: 'Currency commission was charged in, which is always the opposite currency from what the order quantity is specified in.'
          type: string
          example: BTC
        limitPrice:
          description: Original limit price for this order if present.
          type: string
          example: '21005.5'
        orderId:
          description: Order ID generated by anchorage.
          type: string
          example: a94c8d75-6c9d-4903-95f3-5b0893e76cb7
        orderQty:
          description: Original order quantity.
          type: string
          example: '10000.00'
        orderStatus:
          description: Order status
          type: string
          enum:
            - FILLED
            - REJECTED
            - CANCELED
        orderType:
          description: Order type either Market or Limit
          type: string
          enum:
            - MARKET
            - LIMIT
        reasonText:
          description: Additional description for reason of reject or cancel.
          type: string
        rejectReason:
          description: 'Reason for rejection, this is a set of standardized reason code.'
          type: string
          enum:
            - InvalidSymbol
            - InvalidCurrency
            - InvalidSide
            - InvalidQuantity
            - InvalidOrderType
            - InvalidAccount
            - AccountDisabledForTrading
            - UnauthorizedForTrading
            - InsufficientLiquidity
            - DuplicateOrder
            - ExecutionLimitExceeded
            - InternalError
            - InvalidPrice
            - InvalidAccountsInAllocation
            - InvalidCurrencyForFOK
        side:
          description: 'Order side, either "BUY" or "SELL".'
          type: string
          enum:
            - BUY
            - SELL
        subaccountId:
          description: Subaccount ID for this order to book into.
          type: string
          example: 0e2b2f9d-8d10-4f1e-960b-28567255045f
        subaccountTransactionId:
          description: Subaccount transaction ID linked with this order.
          type: string
          example: af2b2f9d-9d1a-4e2e-76ab-2756725dffdf
        symbol:
          description: 'Symbol for the order, e.g. BTC-USD.'
          type: string
          example: BTC-USD
        transactTime:
          description: 'UTC timestamp when order is executed. [RFC 3339](https://datatracker.ietf.org/doc/html/rfc3339#section-5.6) ''date-time''.'
          type: string
          format: date-time
      required:
        - clOrderId
        - orderId
        - execId
        - symbol
        - side
        - currency
        - counterCurrency
        - orderType
        - orderStatus
        - avgPx
        - orderQty
        - cumQty
        - counterQty
        - counterQtyAllIn
        - transactTime
      title: OrderExecutionReport
    OrdersStatusResponse:
      type: object
      properties:
        data:
          type: array
          items:
            $ref: '#/components/schemas/TradingOrderDetails'
        page:
          $ref: '#/components/schemas/Page'
      required:
        - data
        - page
      title: OrdersStatusResponse
    OrderStatusResponse:
      type: object
      properties:
        data:
          $ref: '#/components/schemas/TradingOrderDetails'
      required:
        - data
      title: OrderStatusResponse
    TradingOrderDetails:
      type: object
      properties:
        accountId:
          description: Account ID for this order to book into.
          type: string
          example: 0e2b2f9d-8d10-4f1e-960b-28567255045f
        allocation:
          description: Subaccount allocation
          type: array
          items:
            $ref: '#/components/schemas/Allocation'
          x-omitempty: true
        avgPx:
          description: Average filled price for this order.
          type: string
          example: '21005.4'
        avgPxAllIn:
          description: Average filled price + anchorage commission.
          type: string
          example: '21006.00'
        cancelQty:
          description: quantity canceled for this order.
          type: string
          example: '10000.00'
        clOrderId:
          description: Original client order ID as submitted.
          type: string
          example: 6fb5fc79-0bb4-446d-82dd-d4687fb56a02
        counterQty:
          description: Filled quantity of the counter currency.
          type: string
          example: '0.001'
        counterQtyAllIn:
          description: Filled quantity of the counter currency including all fees.
          type: string
          example: '0.0012'
        cumQty:
          description: 'Cumulative filled quantity for this order. For open orders, orderQty = leavesQty + cumQty. For canceled order, leavesQty = 0, orderQty = cancelQty + cumQty.'
          type: string
          example: '10000.00'
        currency:
          description: The currency in which order quantity is specified in.
          type: string
          example: USD
        feeCurrency:
          description: 'Currency commission was charged in, which is always the opposite currency from what the order quantity is specified in.'
          type: string
          example: BTC
        leavesQty:
          description: quantity that is still open for this order.
          type: string
          example: '10000.00'
        limitPrice:
          description: Original limit price for this order if present.
          type: string
          example: '21005.5'
        orderId:
          description: Order ID generated by anchorage.
          type: string
          example: a94c8d75-6c9d-4903-95f3-5b0893e76cb7
        orderQty:
          description: Original order quantity.
          type: string
          example: '10000.00'
        orderStatus:
          description: Order status
          type: string
          enum:
            - PENDING
            - NEW
            - PARTIALLY_FILLED
            - FILLED
            - REJECTED
            - PENDING_CANCEL
            - CANCELED
        orderType:
          description: General order type.
          type: string
          enum:
            - MARKET
            - LIMIT
            - STOP_LIMIT
            - TAKE_PROFIT_LIMIT
            - STOP_LOSS
            - TWAP
            - VWAP
            - PEGGED
            - POV
            - RFQ
            - LIMIT_ALL_IN
            - MANUAL
            - OTHER
        reasonText:
          description: Additional description for reason of reject or cancel.
          type: string
        rejectReason:
          description: Reason for rejection.
          type: string
        side:
          description: 'Order side, either "BUY" or "SELL".'
          type: string
          enum:
            - BUY
            - SELL
        strategyParams:
          description: Strategy Parameters
          type: object
          properties:
            data:
              $ref: '#/components/schemas/StrategyParams'
          x-omitempty: true
        subaccountId:
          description: Subaccount ID for this order to book into.
          type: string
          example: 0e2b2f9d-8d10-4f1e-960b-28567255045f
        subaccountTransactionId:
          description: Subaccount transaction ID linked with this order.
          type: string
          example: af2b2f9d-9d1a-4e2e-76ab-2756725dffdf
        submitTime:
          description: 'UTC timestamp when order is submitted. [RFC 3339](https://datatracker.ietf.org/doc/html/rfc3339#section-5.6) ''date-time''.'
          type: string
          format: date-time
        symbol:
          description: 'Symbol for the order, e.g. BTC-USD.'
          type: string
          example: BTC-USD
        timeInForce:
          description: Time in force defines the order expiry
          type: string
          enum:
            - GTC
            - FOK
            - IOC
        totalFee:
          description: Commission charged for this order.
          type: string
          example: '10.0'
        transactTime:
          description: 'UTC timestamp when order is executed. [RFC 3339](https://datatracker.ietf.org/doc/html/rfc3339#section-5.6) ''date-time''.'
          type: string
          format: date-time
      required:
        - clOrderId
        - orderId
        - accountId
        - symbol
        - side
        - currency
        - orderQty
        - orderType
        - orderStatus
        - avgPx
        - avgPxAllIn
        - leavesQty
        - cumQty
        - totalFee
        - feeCurrency
        - transactTime
      title: TradingOrderDetails
    TradingPosition:
      description: Negative position values denote amounts that you owe Anchorage Digital and positive position values denote amounts owed to you by Anchorage Digital.
      type: object
      properties:
        positionAmount:
          $ref: '#/components/schemas/Amount'
      required:
        - positionAmount
      title: TradingPosition
    TradingPositionsResponse:
      type: object
      properties:
        data:
          type: array
          items:
            $ref: '#/components/schemas/TradingPosition'
          minItems: 0
          uniqueItems: true
      required:
        - data
      title: TradingPositionsResponse
    QuoteStatus:
      description: |
        A string describing the status of the given quote

        * `OPEN` - The quote request was accepted and the quote can be used to trade.

        * `REJECTED` - The quote was rejected and cannot be used to trade.

        * `EXECUTED` - The quote was traded successfully and can no longer be used to trade.
      type: string
      enum:
        - OPEN
        - REJECTED
        - EXECUTED
      title: QuoteStatus
    SettlementStatus:
      description: |
        A string describing the status of the given settlement

        * `PENDING` - This settlement has been created.

        * `SETTLING` - This settlement is in progress.

        * `SETTLED` - This settlement has been fully settled, this is a terminal state.

        * `CANCELED` - This settlement has been canceled, this is a terminal state.

        * `EXECUTED` - This settlement has been created. This is a deprecated status which will be moved to `PENDING` in the future. Please expect either `EXECUTED` or `PENDING` to have a smooth transition.
      type: string
      enum:
        - PENDING
        - SETTLING
        - SETTLED
        - CANCELED
        - EXECUTED
      title: SettlementStatus
    TradeStatus:
      description: |
        A string describing the status of the given trade

        * `PENDING` - The trade request has been placed and the trade is pending.

        * `EXECUTED` - This trade was executed and is waiting customer deposit.

        * `REJECTED` - This trade was rejected.

        * `CANCELED` - This trade was canceled by Anchorage Digital's trading team due to client legal/financial problems.

        * `SETTLING` - Anchorage Digital received the customer's deposit and the trade is in the process of settling.

        * `SETTLED` - Trade is settled and assets were sent to the customer.

        * `PENDINGALLOCATION` - Trade is executed and is awaiting client allocation.

        * `ALLOCATED` - Trade is fully allocated by the client.
      type: string
      enum:
        - PENDING
        - REJECTED
        - CANCELED
        - EXECUTED
        - SETTLING
        - SETTLED
        - PENDINGALLOCATION
        - ALLOCATED
      title: TradeStatus
    SettlementType:
      description: |
        A string describing the type of a given settlement

        * `TRADE` - This settlement is associated with trades.

        * `ADVISORY_FEE` - This settlement is associated with advisory fees.

        * `CUSTODY_FEE` - This settlement is associated with custody fees.

        * `MANAGEMENT_FEE` - This settlement is associated with management fees.

        * `MODEL_FEE` - This settlement is associated with model fees.
      type: string
      enum:
        - TRADE
        - ADVISORY_FEE
        - CUSTODY_FEE
        - MANAGEMENT_FEE
        - MODEL_FEE
      title: SettlementType
    TransferStakedPositionRequest:
      type: object
      properties:
        destinationInfo:
          description: The details of the transaction to perform. Use the 'type' field to discriminate between different transaction types.
          discriminator:
            propertyName: type
            mapping:
              ETHEREUM_STAKED_POSITION_INFO: '#/components/schemas/EthStakedPositionInfo'
          oneOf:
            - $ref: '#/components/schemas/EthStakedPositionInfo'
      additionalProperties: false
      required:
        - destinationInfo
      title: TransferStakedPositionRequest
    EthStakedPositionInfo:
      type: object
      properties:
        resource:
          description: The identifier of the resource
          type: object
          example:
            identifier: 1c920f4241b78a1d483a29f3c24b6c4c
            type: WALLET
          properties:
            identifier:
              description: Identifier of the resource
              type: string
            type:
              $ref: '#/components/schemas/StakedPositionResourceType'
          required:
            - type
            - identifier
        stakedPositionId:
          description: Identifier of the staked Position
          type: string
        type:
          description: Discriminator field
          type: string
          default: ETHEREUM_STAKED_POSITION_INFO
          enum:
            - ETHEREUM_STAKED_POSITION_INFO
      required:
        - type
        - stakedPositionId
        - resource
      title: EthStakedPositionInfo
    StakedPositionResourceType:
      description: The type of the resource being referenced.
      type: string
      enum:
        - WALLET
        - ADDRESS
      title: StakedPositionResourceType
    TransferStakedPositionResponse:
      type: object
      properties:
        transfer:
          type: object
          properties:
            identifier:
              description: Identifier of a Staked Position Transfer
              type: string
      title: TransferStakedPositionResponse
    TrustedDestinationsResponse:
      type: object
      properties:
        data:
          type: array
          items:
            $ref: '#/components/schemas/TrustedDestination'
        page:
          $ref: '#/components/schemas/Page'
      required:
        - data
        - page
    TrustedDestination:
      type: object
      properties:
        crypto:
          $ref: '#/components/schemas/TrustedDestinationCrypto'
        description:
          description: The description of the trusted destination
          type: string
        fiat:
          $ref: '#/components/schemas/TrustedDestinationFiat'
        id:
          description: A unique ID for the trusted destination
          type: string
        name:
          description: The name of the trusted destination
          type: string
        owner:
          $ref: '#/components/schemas/TrustedDestinationOwner'
        type:
          description: 'Can be either "crypto" or "fiat", indicating which sub-field contains the details for the trusted destination.'
          type: string
      required:
        - id
        - type
    TrustedDestinationCrypto:
      type: object
      properties:
        address:
          description: A crypto address for the intended asset
          type: string
          example: 2N19AcihQ1a4MxQW658UFHTioUNnMkiHPkw
        assetType:
          description: The asset type of the trusted destination.
          type: string
          example: BTC
        isNetworkLevel:
          description: Determines if the Trusted Destination is Network level or not
          type: boolean
          example: true
        memo:
          description: Additional data to be sent along with the transaction on blockchains that support it.
          type: string
        networkId:
          description: The ID of the network this trusted destination belongs to.
          type: string
          example: BTC
      required:
        - address
        - networkId
        - assetType
        - isNetworkLevel
    TrustedDestinationFiat:
      type: object
      properties:
        beneficiary:
          $ref: '#/components/schemas/TrustedDestinationFiatBeneficiary'
        beneficiaryBank:
          $ref: '#/components/schemas/TrustedDestinationFiatBank'
        intermediaryBank:
          $ref: '#/components/schemas/TrustedDestinationFiatBank'
        memo:
          description: 'Note to Beneficiary, maximum 140 characters'
          type: string
          example: Quarterly dividend
          maxLength: 140
        usage:
          description: The owner of the recipient account
          type: string
          example: MY_ORGANIZATION
          enum:
            - MY_ORGANIZATION
            - THIRD_PARTY
      required:
        - usage
        - beneficiary
        - beneficiaryBank
    TrustedDestinationFiatBeneficiary:
      type: object
      properties:
        account:
          description: Beneficiary account number
          type: string
          example: '*****1234'
        address:
          description: Beneficiary address
          type: string
          example: 123 Main Street
        city:
          description: Beneficiary city
          type: string
          example: Beverly Hills
        country:
          description: Beneficiary country
          type: string
          example: US
        name:
          description: The name of the beneficiary
          type: string
          example: Satoshi Nakamoto
        state:
          description: Beneficiary state
          type: string
          example: CA
        type:
          description: The beneficiary type
          type: string
          example: INDIVIDUAL
          enum:
            - BUSINESS
            - INDIVIDUAL
        zipCode:
          description: Beneficiary zip code
          type: string
          example: '90210'
      required:
        - name
        - type
        - account
        - address
        - city
        - state
        - zipCode
        - country
    TrustedDestinationFiatBank:
      type: object
      properties:
        address:
          description: Financial institution address
          type: string
          example: 240 Greenwich Street
        city:
          description: Financial institution city
          type: string
          example: New York
        code:
          description: |-
            Financial institution ID code

             * `ABA` - Routing number
             * `BIC` - SWIFT code
          type: string
          example: BIC
        country:
          description: Financial institution country
          type: string
          example: US
        id:
          description: Financial institution ID
          type: string
          example: IRVTUS3N
        name:
          description: The name of the financial institution
          type: string
          example: The Bank of New York Mellon
        state:
          description: Financial institution state
          type: string
          example: NY
        zipCode:
          description: Financial institution zip code
          type: string
          example: '10286'
      required:
        - name
        - code
        - id
        - address
        - city
        - state
        - zipCode
        - country
    CreateTrustedDestinationsRequest:
      type: object
      properties:
        idempotentId:
          description: A client-provided unique ID for idempotent requests
          type: string
          example: 1ca86e65-4340-4876-85f4-8334852b9c43
          maxLength: 128
          x-nullable: true
        owner:
          $ref: '#/components/schemas/TrustedDestinationOwner'
        trustedDestinations:
          type: array
          items:
            $ref: '#/components/schemas/TrustedDestinationData'
      required:
        - idempotentId
        - trustedDestinations
    CreateTrustedDestinationsResponse:
      type: object
      properties:
        creationRequestId:
          description: The client-provided ID which can be used to specify this request in other operations
          type: string
          example: 1ca86e65-4340-4876-85f4-8334852b9c43
          maxLength: 128
      required:
        - creationRequestId
    TrustedDestinationOwner:
      description: The Owner of the Trusted Destinations
      type: object
      properties:
        id:
          description: |-
            The id of the Owner of the Trusted Destination.
            * For owner type `CUSTOMER`, this is the respective CustomerID.
          type: string
        type:
          description: 'Currently always `CUSTOMER`, but when other types exist this will become an enum with multiple possible values, indicating how the `id` field should be interpreted.'
          type: string
          example: CUSTOMER
          enum:
            - CUSTOMER
      required:
        - type
        - id
    TrustedDestinationData:
      description: Information of a new Trusted Destination to be created
      type: object
      properties:
        address:
          description: A crypto address for the intended destination. Required for crypto trusted destinations.
          type: string
          example: 2N19AcihQ1a4MxQW658UFHTioUNnMkiHPkw
        assetType:
          description: |
            A string representing a type of crypto-asset, which usually corresponds to the crypto asset's ticker symbol. Required for crypto trusted destinations.

            Use `/asset-types` to list all of the supported asset types for your organization.
          type: string
          example: BTC
        description:
          description: Description containing details about this Trusted Destination. Required for crypto trusted destinations.
          type: string
        fiat:
          $ref: '#/components/schemas/TrustedDestinationFiatData'
        isNetworkLevel:
          description: Determines if the created Trusted Destination is Network level or not
          type: boolean
          example: true
          default: false
        memo:
          description: An optional string providing more context for this hold.
          type: string
          example: Internal trade ID 0xabc123
          maxLength: 512
        name:
          description: The name that will be used to identify this Trusted Destination.
          type: string
          maxLength: 32
        trustedDestinationAmlQuestionnaire:
          $ref: '#/components/schemas/TrustedDestinationAmlQuestionnaire'
        type:
          description: 'Can be either "crypto" or "fiat", indicating which fields describe the trusted destination. Defaults to "crypto" when omitted, unless the `fiat` field is set. All trusted destinations in one request must be of the same type.'
          type: string
          enum:
            - crypto
            - fiat
      required:
        - name
    TrustedDestinationFiatData:
      description: Details of a new fiat (wire) Trusted Destination. Required when `type` is "fiat".
      type: object
      properties:
        beneficiary:
          $ref: '#/components/schemas/TrustedDestinationFiatBeneficiaryData'
        beneficiaryBank:
          $ref: '#/components/schemas/TrustedDestinationFiatBankData'
        intermediaryBank:
          $ref: '#/components/schemas/TrustedDestinationFiatIntermediaryBankData'
        memo:
          description: 'Note to Beneficiary, maximum 140 characters'
          type: string
          example: Quarterly dividend
          maxLength: 140
        usage:
          description: The owner of the recipient account
          type: string
          example: MY_ORGANIZATION
          enum:
            - MY_ORGANIZATION
            - THIRD_PARTY
      required:
        - usage
        - beneficiary
        - beneficiaryBank
    TrustedDestinationFiatBeneficiaryData:
      description: The beneficiary of a new fiat Trusted Destination
      type: object
      properties:
        account:
          description: Beneficiary account number
          type: string
          example: '123456789'
        address:
          description: Beneficiary street address
          type: string
          example: 123 Main Street
        city:
          description: Beneficiary city
          type: string
          example: Beverly Hills
        country:
          description: Beneficiary country (ISO 3166-1 alpha-2 code)
          type: string
          example: US
        entityName:
          description: Name of the beneficiary business. Required when `type` is BUSINESS.
          type: string
          example: Acme Corp.
        firstName:
          description: First name of the beneficiary. Required when `type` is INDIVIDUAL.
          type: string
          example: Satoshi
        lastName:
          description: Last name of the beneficiary. Required when `type` is INDIVIDUAL.
          type: string
          example: Nakamoto
        state:
          description: Beneficiary state or province
          type: string
          example: CA
        type:
          description: The beneficiary type
          type: string
          example: INDIVIDUAL
          enum:
            - BUSINESS
            - INDIVIDUAL
        zipCode:
          description: Beneficiary zip code
          type: string
          example: '90210'
      required:
        - type
        - account
        - address
        - city
        - state
        - zipCode
        - country
    TrustedDestinationFiatBankData:
      description: A financial institution of a new fiat Trusted Destination
      type: object
      properties:
        address:
          description: Financial institution street address
          type: string
          example: 240 Greenwich Street
        city:
          description: Financial institution city
          type: string
          example: New York
        code:
          description: |-
            Financial institution ID code

             * `ABA` - Routing number
             * `BIC` - SWIFT code
          type: string
          example: BIC
          enum:
            - ABA
            - BIC
        country:
          description: Financial institution country (ISO 3166-1 alpha-2 code)
          type: string
          example: US
        id:
          description: 'Financial institution ID (a 9-digit routing number for `ABA`, a SWIFT code for `BIC`)'
          type: string
          example: IRVTUS3N
        name:
          description: The name of the financial institution
          type: string
          example: The Bank of New York Mellon
        state:
          description: Financial institution state or province
          type: string
          example: NY
        zipCode:
          description: Financial institution zip code
          type: string
          example: '10286'
      required:
        - name
        - code
        - id
        - address
        - city
        - state
        - zipCode
        - country
    TrustedDestinationFiatIntermediaryBankData:
      description: The intermediary (correspondent) financial institution of a new fiat Trusted Destination. Only US intermediaries identified by an ABA routing number are supported. Required when `beneficiaryBank.code` is "BIC".
      type: object
      properties:
        address:
          description: Financial institution street address
          type: string
          example: 240 Greenwich Street
        city:
          description: Financial institution city
          type: string
          example: New York
        code:
          description: |-
            Financial institution ID code

             * `ABA` - Routing number

            Intermediary banks only support `ABA`.
          type: string
          example: ABA
          default: ABA
          enum:
            - ABA
        country:
          description: Financial institution country (ISO 3166-1 alpha-2 code)
          type: string
          example: US
        id:
          description: Financial institution ID (a 9-digit routing number)
          type: string
          example: '021000018'
        name:
          description: The name of the financial institution
          type: string
          example: The Bank of New York Mellon
        state:
          description: Financial institution state or province
          type: string
          example: NY
        zipCode:
          description: Financial institution zip code
          type: string
          example: '10286'
      required:
        - name
        - code
        - id
        - address
        - city
        - state
        - zipCode
        - country
    TrustedDestinationAmlQuestionnaire:
      description: Anti-money laundering questionnaire. Required for Anchorage Digital organizations. Must not be provided for Porto organizations — including this field for Porto organizations will result in an error.
      type: object
      properties:
        destinationType:
          description: Where the address that will receive the withdrawal is held.
          type: string
          example: FINANCIAL_INSTITUTION
          enum:
            - FINANCIAL_INSTITUTION
            - SELFHOSTED_WALLET
        institutionCountry:
          description: 'The country of the institution on the receiving end of the withdrawal, must be specified when the `destinationType` is `FINANCIAL_INSTITUTION` (ISO 3166-1 alpha-2 code).'
          type: string
          example: US
        institutionName:
          description: 'The name of the institution on the receiving end of the withdrawal, must be specified when the `destinationType` is `FINANCIAL_INSTITUTION`.'
          type: string
          example: Coinbase
        recipientCity:
          description: 'The city of the person or entity that will receive the funds being withdrawn, can be specified when the `recipientType` is `PERSON` or `ENTITY` (optional, except if Street Address is indicated).'
          type: string
          example: San Francisco
        recipientCountry:
          description: 'The country of the entity or person that will receive the funds being withdrawn, must be specified when the `recipientType` is `PERSON` or `ENTITY` (ISO 3166-1 alpha-2 code).'
          type: string
          example: JP
        recipientFirstName:
          description: 'The first name of the person that will receive the funds being withdrawn, must be specified when the `recipientType` is `PERSON`.'
          type: string
          example: Satoshi
        recipientFullName:
          description: 'The full name of the entity that will receive the funds being withdrawn, must be specified when the `recipientType` is `ENTITY`.'
          type: string
          example: Satoshi Nakamoto
        recipientLastName:
          description: 'The last name of the person that will receive the funds being withdrawn, must be specified when the `recipientType` is `PERSON`.'
          type: string
          example: Nakamoto
        recipientPostalCode:
          description: 'The zip code/postal code of the person or entity that will receive the funds being withdrawn, can be specified when the `recipientType` is `PERSON` or `ENTITY` (optional).'
          type: string
          example: 65584-5678
        recipientStateProvince:
          description: 'The state/province of the person or entity that will receive the funds being withdrawn, can be specified when the `recipientType` is `PERSON` or `ENTITY` (full name format) (optional).'
          type: string
          example: Wyoming
        recipientStreetAddress:
          description: 'The street address of the person or entity that will receive the funds being withdrawn, can be specified when the `recipientType` is `PERSON` or `ENTITY` (optional, except if City is indicated).'
          type: string
          example: '1234 NW Bobcat Lane, St. Robert, MO'
        recipientType:
          description: |-
            The entity or person that will receive the funds being withdrawn.
            * `DESTINATION_INSTITUTION` - Financial institution specified above in `institutionName`
            * `MY_ORGANIZATION` - Same organization initiating the withdrawal, the Anchorage Digital account owner
            * `PERSON` - Other person
            * `ENTITY` - Other entity
          type: string
          example: PERSON
          enum:
            - DESTINATION_INSTITUTION
            - MY_ORGANIZATION
            - PERSON
            - ENTITY
        selfhostedDescription:
          description: 'A description of the self-hosted wallet, must be specified when the `destinationType` is `SELFHOSTED_WALLET`.'
          type: string
          example: An explanation about where this address is held
        selfhostedWalletOwner:
          description: 'The owner of the self-hosted wallet, can be specified when the `destinationType` is `SELFHOSTED_WALLET`.'
          type: string
          example: MY_ORGANIZATION
          enum:
            - MY_ORGANIZATION
            - PERSON_OR_ENTITY
    TrustedDestinationStatusResponse:
      type: object
      properties:
        status:
          description: |-
            A string describing the status of the Trusted Destination creation request

            * `Initiated`
            * `Generating Docusign`
            * `Pending DocuSign Signature`
            * `Trusted Destination Operation In Progress`
            * `Needs Quorum Approval`
            * `Anchorage Risk Review`
            * `Linking Trusted Destination`
            * `Complete`
            * `Failed`
            * `Rejected`
            * `Canceled`
            * `Expired`
          type: string
    UpdateCMOperationResponse:
      description: 'Contains the full, updated operation object.'
      allOf:
        - $ref: '#/components/schemas/CMOperation'
    CMCreateOperationRequest:
      type: object
      properties:
        action:
          $ref: '#/components/schemas/CMOperationActionInput'
        asset:
          $ref: '#/components/schemas/CMAssetType'
        idempotentId:
          description: Idempotency single key
          type: string
          maxLength: 128
        notes:
          description: Optional notes or comments related to the operation
          type: string
        quantity:
          description: 'The quantity of the asset to be used in the operation, expressed as a decimal string.'
          type: string
        type:
          $ref: '#/components/schemas/CMOperationTypeInput'
        typeId:
          description: The ID of the collateral package (packageId) or exposure (exposureId) for this operation
          type: string
      required:
        - type
        - typeId
        - action
        - quantity
        - asset
    CMOperationType:
      description: The type of entity the operation is being performed on. This can be either a `COLLATERAL_PACKAGE` or an `EXPOSURE`.
      type: string
      enum:
        - COLLATERAL_PACKAGE
        - EXPOSURE
        - LIQUIDATION
    CMOperationTypeInput:
      description: The type of entity the operation is being performed on. This can be either a `COLLATERAL_PACKAGE` or an `EXPOSURE`.
      type: string
      enum:
        - COLLATERAL_PACKAGE
        - EXPOSURE
    CMOperationAction:
      description: |-
        The specific action to be performed in the operation.

        Valid actions for exposures are:
        1. `INITIAL_FUNDING`
        2. `PAY_DOWN`
        3. `PAY_UP`
        4. `INTEREST_PAYDOWN`
        5. `INTEREST_ACCRUAL`
        6. `DUST`

        Valid actions for collateral packages are:
        1. `INITIAL_DEPOSIT`
        2. `MARGIN_RETURN`
        3. `TOP_UP`
        4. `CLOSE_RETURN`.
        5. `REHYPE_IN`
        6. `REHYPE_OUT`
      type: string
      enum:
        - INITIAL_DEPOSIT
        - INITIAL_FUNDING
        - MARGIN_RETURN
        - PAY_DOWN
        - PAY_UP
        - INTEREST_PAYDOWN
        - INTEREST_ACCRUAL
        - TOP_UP
        - CLOSE_RETURN
        - FULL_LIQUIDATION
        - PARTIAL_LIQUIDATION
        - SWEEP
        - REHYPE_IN
        - REHYPE_OUT
        - GAS_FEE
        - DUST
    CMOperationActionInput:
      description: |
        The specific action to be performed in the operation.

        Valid actions for exposures are:
        1. `INITIAL_FUNDING`
        2. `PAY_DOWN`
        3. `PAY_UP`
        4. `INTEREST_PAYDOWN`
        5. `INTEREST_ACCRUAL`

        Valid actions for collateral packages are:
        1. `INITIAL_DEPOSIT`
        2. `MARGIN_RETURN`,
        3. `TOP_UP`
        4. `CLOSE_RETURN`.
        5. `REHYPE_IN`
        6. `REHYPE_OUT`
      type: string
      enum:
        - INITIAL_DEPOSIT
        - INITIAL_FUNDING
        - MARGIN_RETURN
        - PAY_DOWN
        - PAY_UP
        - INTEREST_PAYDOWN
        - INTEREST_ACCRUAL
        - TOP_UP
        - CLOSE_RETURN
        - REHYPE_IN
        - REHYPE_OUT
    CMOperationResponse:
      type: object
      properties:
        operationId:
          type: string
      required:
        - operationId
    CreateCMPackageResponse:
      type: object
      properties:
        packageId:
          type: string
      required:
        - packageId
    UpdateCMPackageResponse:
      $ref: '#/components/schemas/CMPackage'
    CMOperationsResponse:
      type: object
      properties:
        data:
          type: array
          items:
            $ref: '#/components/schemas/CMOperation'
        page:
          $ref: '#/components/schemas/Page'
      required:
        - data
        - page
    CMOperation:
      description: 'In the context of Collateral Management, an operation is a recorded transaction or activity performed on either a Collateral Package or an Exposure. Operations represent specific actions that affect the balance or status of collateral or loan exposures.'
      type: object
      properties:
        action:
          $ref: '#/components/schemas/CMOperationAction'
        asset:
          $ref: '#/components/schemas/CMAssetType'
        createdAt:
          description: The timestamp of when this record was created not necessarily when the operation was executed.
          type: string
          format: date-time
          example: '2019-01-02T12:34:56.000Z'
        id:
          description: Unique identifier for the operation (operationId)
          type: string
        liquidationCollateralPackageId:
          description: The unique identifier of the collateral package that is being liquidated
          type: string
        liquidationProceedAsset:
          $ref: '#/components/schemas/CMAssetType'
        liquidationProceedQuantity:
          description: The decimal quantity of the proceeds received from the liquidation
          type: string
        notes:
          description: An optional field for additional comments or contextual information related to the operation.
          type: string
        quantity:
          description: 'The decimal amount of the asset being added, removed, or modified in the operation, expressed as a string'
          type: string
        type:
          $ref: '#/components/schemas/CMOperationType'
        typeId:
          description: 'Contains the unique identifier of either the collateral package (packageId) or exposure (exposureId) that the operation is being performed on, depending on the value in the type field'
          type: string
        updatedAt:
          description: The timestamp of when this record was last updated
          type: string
          format: date-time
          example: '2019-01-02T12:34:56.000Z'
      required:
        - id
        - type
        - typeId
        - action
        - asset
        - quantity
        - createdAt
        - updatedAt
    CMPackageActionMarginReturn:
      description: The action to be taken when the collateral package transitions into a Margin Return state
      type: string
      enum:
        - NONE
        - SWEEP
    CMTopUpType:
      description: 'Option on how to satisfy a Margin Call. If ‘LTV’ is selected, the requirement to cure the margin call is to bring the LTV below the ‘returnToLtv’ (healthy state). If ‘QUANTITY’ is selected, the requirement to cure the margin call is to provide the number of units of collateral asset calculated when the margin call was issued, regardless if LTV fluctuates during a potential cure period'
      type: string
      enum:
        - LTV
        - QUANTITY
    CMPriceSourcesResponse:
      description: Response containing price sources and their available trading pairs
      type: object
      properties:
        priceSources:
          description: List of price sources (exchanges) with their available assets
          type: array
          items:
            $ref: '#/components/schemas/CMPriceSourceAssets'
      required:
        - priceSources
    CMPriceSourceAssets:
      description: A price source (exchange) with its available trading pairs and pricing strategies
      type: object
      properties:
        assets:
          description: 'List of available trading pairs (e.g., BTC-USD, ETH-USD)'
          type: array
          items:
            type: string
        priceSource:
          $ref: '#/components/schemas/CMPriceSource'
        strategies:
          description: List of available pricing strategies for this exchange
          type: array
          items:
            $ref: '#/components/schemas/CMPriceStrategy'
      required:
        - priceSource
        - assets
        - strategies
    CMCreateExposureRequest:
      description: The request payload for creating a new collateral exposure.
      type: object
      properties:
        assetTrackingConfig:
          $ref: '#/components/schemas/CMExposureAssetTrackingConfig'
        clientReferenceId:
          description: 'A reference identifier provided by the client for this collateral exposure. For example: client’s internal loan ID'
          type: string
        collateralPackageID:
          description: ID of the collateral package (packageId)
          type: string
        priceStrategy:
          $ref: '#/components/schemas/CMPriceStrategy'
        type:
          $ref: '#/components/schemas/CMExposureType'
      required:
        - type
        - collateralPackageID
        - priceStrategy
        - assetTrackingConfig
    CMExposureAssetTrackingConfig:
      description: CM Exposure Asset tracking config
      type: object
      properties:
        asset:
          $ref: '#/components/schemas/CMAssetType'
        liquidationPriority:
          description: The priority order for liquidating this asset in the event of a default or margin call
          type: integer
        notes:
          description: Optional additional notes or comments about the asset tracking configuration
          type: string
        priceSource:
          $ref: '#/components/schemas/CMPriceSource'
      required:
        - asset
        - liquidationPriority
    CMExposureType:
      description: Type of exposure
      type: string
      enum:
        - LOAN
    CMCreateExposureResponse:
      type: object
      properties:
        exposureId:
          type: string
      required:
        - exposureId
    CMMarginReturnRequest:
      description: The request payload for requesting a margin return on a collateral package.
      type: object
      properties:
        assetAmounts:
          description: Asset types and amounts to return to the pledgor. Wallet IDs are determined from the package's asset configuration.
          type: array
          items:
            $ref: '#/components/schemas/CMMarginReturnAssetAmount'
          minItems: 1
        idempotencyKey:
          description: Idempotency key for ensuring operation uniqueness.
          type: string
          maxLength: 128
        useGasStation:
          description: Whether to use gas station for fee payment. Defaults to false.
          type: boolean
          default: false
      required:
        - assetAmounts
        - idempotencyKey
    CMMarginReturnAssetAmount:
      description: An asset type and amount pair for a margin return.
      type: object
      properties:
        assetTypeID:
          description: 'The asset type ID (e.g. BTC, ETH) for this amount.'
          type: string
        value:
          description: 'The amount of the asset to return, expressed as a decimal string.'
          type: string
      required:
        - assetTypeID
        - value
    CMMarginReturnResponse:
      description: Response from requesting a margin return.
      type: object
      properties:
        settlementId:
          description: Settlement network ID for the created two-way settlement. Used to track the settlement through its lifecycle.
          type: string
      required:
        - settlementId
    CMPayUpRequest:
      description: The request payload for requesting a pay-up (exposure increase) on a collateral package.
      type: object
      properties:
        assetAmounts:
          description: Asset types and amounts to receive from the secured party. The destination wallet is determined from each asset's exposure configuration.
          type: array
          items:
            $ref: '#/components/schemas/CMPayUpAssetAmount'
          minItems: 1
        idempotencyKey:
          description: Idempotency key for ensuring operation uniqueness.
          type: string
          maxLength: 128
        useGasStation:
          description: Whether to use gas station for fee payment. Defaults to false.
          type: boolean
          default: false
      required:
        - assetAmounts
        - idempotencyKey
    CMPayUpAssetAmount:
      description: An asset type and amount pair for a pay-up.
      type: object
      properties:
        assetTypeID:
          description: 'The asset type ID (e.g. BTC, ETH) for this amount.'
          type: string
        sourceWalletID:
          description: The wallet that funds this leg. Required when the secured party initiates the pay-up; must be omitted when the pledgor initiates (the secured party picks their own source wallet at settlement-endorsement time).
          type: string
        value:
          description: 'The amount of the asset to receive, expressed as a decimal string.'
          type: string
      required:
        - assetTypeID
        - value
    CMPayUpResponse:
      description: Response from requesting a pay-up. Pending the secured party's endorsement if pledgor-initiated; already executing if secured-party-initiated.
      type: object
      properties:
        settlementId:
          description: Settlement network ID for the created two-way settlement. Used to track the settlement through its lifecycle. The settlement is pending the secured party's endorsement.
          type: string
      required:
        - settlementId
    UpdateKYCApplicationRequest:
      type: object
      properties:
        entries:
          description: A collection of responses for a set of defined relevant questions.
          type: array
          items:
            $ref: '#/components/schemas/KYCApplicationEntry'
      required:
        - entries
      title: UpdateKYCApplicationRequest
    UpdateKYCApplicationResponse:
      type: object
      properties:
        data:
          $ref: '#/components/schemas/UpdateKYCApplicationResponseData'
      required:
        - data
      title: UpdateKYCApplicationResponse
    UpdateKYCApplicationResponseData:
      type: object
      properties:
        customerId:
          description: Unique identifier for the customer onboarding application
          type: string
        id:
          description: DEPRECATED - Use customerId instead
          type: string
        status:
          description: Status of the customer onboarding application
          type: string
      required:
        - customerId
        - status
      title: UpdateKYCApplicationResponseData
    KYCSubaccountApplication:
      description: |
        Onboarding KYC Customer Account Applications
      type: object
      properties:
        entries:
          description: A collection of responses for a set of defined relevant questions.
          type: array
          items:
            $ref: '#/components/schemas/KYCApplicationEntry'
        errors:
          description: A collection of errors validating the responses.
          type: array
          items:
            $ref: '#/components/schemas/KYCApplicationError'
        externalId:
          description: External identifier for the customer subaccount onboarding application. This value has to be unique for each customer subaccount application.
          type: string
        name:
          description: The name of the subaccount.
          type: string
        status:
          description: Status of the onboarding application
          type: string
        subaccountId:
          description: Unique identifier for the customer subaccount application
          type: string
      required:
        - subaccountId
        - externalId
        - status
        - entries
      title: KYCSubaccountApplication
    KYCSubaccountApplicationItem:
      description: |
        Onboarding KYC Customer Account Application
      type: object
      properties:
        externalId:
          description: External identifier for the customer subaccount onboarding application. This value has to be unique for each customer subaccount application.
          type: string
        name:
          description: The name of the subaccount.
          type: string
        status:
          description: Status of the onboarding application
          type: string
        subaccountId:
          description: Unique identifier for the customer subaccount application
          type: string
      required:
        - subaccountId
        - externalId
        - status
      title: KYCSubaccountApplicationItem
    GetKYCSubaccountApplicationResponse:
      description: |
        Get Onboarding KYC Account Application Response
      type: object
      properties:
        data:
          $ref: '#/components/schemas/KYCSubaccountApplication'
      title: GetKYCSubaccountApplicationResponse
    GetKYCSubaccountApplicationsResponse:
      description: |
        Get Onboarding KYC Account Applications Response
      type: object
      properties:
        data:
          type: array
          items:
            $ref: '#/components/schemas/KYCSubaccountApplicationItem'
        page:
          $ref: '#/components/schemas/Page'
      title: GetKYCSubaccountApplicationsResponse
    CreateKYCSubaccountApplicationRequest:
      type: object
      properties:
        entries:
          description: A collection of responses for a set of defined relevant questions.
          type: array
          items:
            $ref: '#/components/schemas/KYCApplicationEntry'
        externalId:
          description: External identifier for the customer subaccount onboarding application. This value has to be unique for each customer subaccount application.
          type: string
        name:
          description: The name of the subaccount.
          type: string
        submit:
          description: Optional parameter to try to submit the application if there are no validation errors. This action is irreversible you cannot update the application values after. You can use this to avoid making another api call to POST /v2/onboarding/subaccounts/submit
          type: boolean
      required:
        - externalId
        - entries
      title: CreateKYCSubaccountApplicationRequest
    CreateKYCSubaccountApplicationResponse:
      type: object
      properties:
        data:
          $ref: '#/components/schemas/CreateKYCSubaccountApplicationResponseData'
      required:
        - data
      title: CreateKYCSubaccountApplicationResponse
    CreateKYCSubaccountApplicationResponseData:
      type: object
      properties:
        status:
          description: 'Status of the customer subaccount onboarding application, possible values are  DRAFT, IN_PROGRESS, IN_REVIEW and COMPLETE'
          type: string
        subaccountId:
          description: Unique identifier for the customer subaccount onboarding application
          type: string
      required:
        - subaccountId
        - status
      title: CreateKYCSubaccountApplicationResponseData
    UpdateKYCSubaccountApplicationRequest:
      type: object
      properties:
        entries:
          description: A collection of responses for a set of defined relevant questions.
          type: array
          items:
            $ref: '#/components/schemas/KYCApplicationEntry'
      required:
        - entries
      title: UpdateKYCSubaccountApplicationRequest
    UpdateKYCSubaccountApplicationResponse:
      type: object
      properties:
        data:
          $ref: '#/components/schemas/UpdateKYCSubaccountApplicationResponseData'
      required:
        - data
      title: UpdateKYCSubaccountApplicationResponse
    UpdateKYCSubaccountApplicationResponseData:
      type: object
      properties:
        status:
          description: Status of the customer onboarding application
          type: string
        subaccountId:
          description: Unique identifier for the customer onboarding application
          type: string
      required:
        - subaccountId
        - status
      title: UpdateKYCSubaccountApplicationResponseData
    CreateKYCAgreementRequest:
      type: object
      properties:
        frameAncestor:
          description: URL where the terms and conditions link should be embedded
          type: string
        legalEntityName:
          description: Legal entity name of the customer
          type: string
        returnUrl:
          description: URL of the page to return to once the terms and conditions have been accepted
          type: string
        signerEmail:
          description: Email of the signer
          type: string
        signerFirstName:
          description: First name of the signer
          type: string
        signerLastName:
          description: Last name of the signer
          type: string
        termsAgreementFormat:
          description: Terms and Conditions format
          type: string
          default: anchorage
          enum:
            - anchorage
            - docusign
      required:
        - legalEntityName
        - signerFirstName
        - signerLastName
        - signerEmail
      title: CreateKYCAgreementRequest
    CreateKYCAgreementResponse:
      type: object
      properties:
        data:
          $ref: '#/components/schemas/CreateKYCAgreementResponseData'
      required:
        - data
      title: CreateKYCAgreementResponse
    CreateKYCAgreementResponseData:
      type: object
      properties:
        id:
          description: Unique identifier for the customer onboarding agreement
          type: string
        legalEntityName:
          description: Legal entity name of the customer
          type: string
        signerEmail:
          description: Email of the signer
          type: string
        signerFirstName:
          description: First name of the signer
          type: string
        signerLastName:
          description: Last name of the signer
          type: string
        status:
          description: Status of the customer onboarding agreement signature process
          type: string
          enum:
            - UNSPECIFIED
            - IN_PROGRESS
            - COMPLETE
            - DECLINED
            - VOIDED
        termsAgreementFormat:
          description: Terms and Conditions format
          type: string
          enum:
            - anchorage
            - docusign
        url:
          description: URL to proceed with the customer onboarding agreement signature
          type: string
      required:
        - id
        - url
        - status
        - legalEntityName
        - signerFirstName
        - signerLastName
        - signerEmail
        - termsAgreementFormat
      title: CreateKYCAgreementResponseData
    GetKYCAgreementsResponse:
      type: object
      properties:
        data:
          type: array
          items:
            $ref: '#/components/schemas/GetKYCAgreementResponseData'
        page:
          $ref: '#/components/schemas/Page'
      title: GetKYCAgreementsResponse
    GetKYCAgreementResponse:
      type: object
      properties:
        data:
          $ref: '#/components/schemas/GetKYCAgreementResponseData'
      required:
        - data
      title: GetKYCAgreementResponse
    GetKYCAgreementResponseData:
      type: object
      properties:
        id:
          description: Unique identifier for the customer onboarding agreement
          type: string
        legalEntityName:
          description: Legal entity name of the customer
          type: string
        signerEmail:
          description: Email of the signer
          type: string
        signerFirstName:
          description: First name of the signer
          type: string
        signerLastName:
          description: Last name of the signer
          type: string
        status:
          description: Status of the customer onboarding agreement signature process
          type: string
          enum:
            - UNSPECIFIED
            - IN_PROGRESS
            - COMPLETE
            - DECLINED
            - VOIDED
        termsAgreementFormat:
          description: Terms and Conditions format
          type: string
          enum:
            - anchorage
            - docusign
        url:
          description: URL to proceed with the customer onboarding agreement signature
          type: string
      required:
        - id
        - status
        - legalEntityName
        - signerFirstName
        - signerLastName
        - signerEmail
        - termsAgreementFormat
      title: GetKYCAgreementResponseData
    UpdateSubaccountRequest:
      description: Details of the subaccount to open for the customer
      type: object
      properties:
        beneficiaryGroup:
          $ref: '#/components/schemas/BeneficiaryGroup'
        contingencyBeneficiaryGroup:
          $ref: '#/components/schemas/BeneficiaryGroup'
        fees:
          description: List of fees to be update
          type: array
          items:
            $ref: '#/components/schemas/UpdateFeeDetailType'
        programSignerGroup:
          $ref: '#/components/schemas/ProgramSignerGroup'
      example:
        fees:
          - type: ADVISORY
            rate: 0.01
            startDate: '2023-12-01'
      title: UpdateSubaccountRequest
    UpdateSubaccountResponse:
      type: object
      properties:
        data:
          $ref: '#/components/schemas/SubaccountIdResponse'
      required:
        - data
      title: UpdateSubaccountResponse
    CreateFeeDetailType:
      type: object
      properties:
        isBillable:
          description: Defines if a fee will be billed directly to the subaccount.
          type: boolean
          default: true
        rate:
          description: The rate should be in percentage format. The rate should be a value between 0 and 1 where 0.01 is 1%.
          type: number
          default: 0
          maximum: 1
          minimum: 0
        type:
          $ref: '#/components/schemas/CreateFeeType'
      required:
        - type
      title: CreateFeeDetailType
    UpdateFeeDetailType:
      type: object
      properties:
        isBillable:
          description: Defines if a fee will be billed directly to the subaccount.
          type: boolean
          default: true
        rate:
          description: The rate should be in percentage format. The rate should be a value between 0 and 1 where 0.01 is 1%.
          type: number
          default: 0
          maximum: 1
          minimum: 0
        startDate:
          description: 'The start date (inclusive) in `YYYY-MM-DD` format. This date should always be set in the future. Dates are always in UTC [RFC 3339](https://datatracker.ietf.org/doc/html/rfc3339#section-5.6) ''full-date''.'
          type: string
          format: date
        type:
          $ref: '#/components/schemas/CreateFeeType'
      required:
        - type
        - startDate
      title: UpdateFeeDetailType
    FeeDetailType:
      type: object
      properties:
        isBillable:
          description: Defines if a fee will be billed directly to the subaccount.
          type: boolean
        rate:
          description: The rate should be in percentage format. The rate should be a value between 0 and 1 where 0.01 is 1%.
          type: number
          maximum: 1
          minimum: 0
        startDate:
          description: 'The start date (inclusive) in `YYYY-MM-DD` format. This date should always be set in the future. Dates are always in UTC [RFC 3339](https://datatracker.ietf.org/doc/html/rfc3339#section-5.6) ''full-date''.'
          type: string
          format: date
        type:
          $ref: '#/components/schemas/FeeType'
      required:
        - type
        - rate
        - startDate
        - isBillable
      title: FeeDetailType
    CreateFeeType:
      type: string
      enum:
        - ADVISORY
        - MODEL
        - MANAGEMENT
      title: CreateFeeType
    FeeType:
      type: string
      enum:
        - ADVISORY
        - MODEL
        - MANAGEMENT
        - CUSTODY
      title: FeeType
    FeeCalculationStateType:
      type: string
      enum:
        - ONGOING
        - DONE
      title: FeeStateType
    BeneficiaryType:
      type: string
      enum:
        - SPOUSE
        - FAMILY_OR_FRIEND
        - CHARITY
        - TRUST
        - ESTATE
      title: BeneficiaryType
    Beneficiary:
      type: object
      properties:
        beneficiaryAllocation:
          type: number
          maximum: 100
          minimum: 0
        beneficiaryName:
          type: string
        beneficiaryType:
          $ref: '#/components/schemas/BeneficiaryType'
      required:
        - beneficiaryType
        - beneficiaryName
        - beneficiaryAllocation
      title: Beneficiary
    BeneficiaryGroup:
      type: array
      items:
        $ref: '#/components/schemas/Beneficiary'
      title: BeneficiaryGroup
    ProgramSigner:
      type: object
      properties:
        programSignerEmail:
          type: string
        programSignerFirstName:
          type: string
        programSignerLastName:
          type: string
      required:
        - programSignerFirstName
        - programSignerLastName
        - programSignerEmail
      title: ProgramSigner
    ProgramSignerGroup:
      type: array
      items:
        $ref: '#/components/schemas/ProgramSigner'
      title: ProgramSignerGroup
    SubaccountTransactionType:
      description: |
        A string describing the type of the given transaction

        * DEPOSIT - Deposit transaction

        * WITHDRAWAL - Withdrawal transaction

        * TRADE - Trade transaction

        * MANAGEMENT_FEE - Management fee

        * CUSTODY_FEE - Custody fee

        * ADVISORY_FEE - Advisory fee

        * MODEL_FEE - Model fee

        * SUBACCOUNT_TRANSFER - subaccount transfer

        * TRADE_SETTLEMENT - Trade settlement

        * DEPOSIT_SWEEP - Deposit sweep

        * GAS_FILL - Gas fill transaction

        * FEE_SETTLEMENT - Fee settlement

        * TRANSACTION_FEE - Transaction fee

        * RETURN - Return transaction

        * STAKE - Stake transaction

        * UNSTAKE - Stake transaction

        * CLAIM - Claim rewards

        * STAKING_REWARD - Staking rewards

        * DELEGATION_REWARD - Delegation rewards
      type: string
      enum:
        - DEPOSIT
        - WITHDRAWAL
        - TRADE
        - MANAGEMENT_FEE
        - CUSTODY_FEE
        - ADVISORY_FEE
        - MODEL_FEE
        - SUBACCOUNT_TRANSFER
        - TRADE_SETTLEMENT
        - DEPOSIT_SWEEP
        - GAS_FILL
        - FEE_SETTLEMENT
        - TRANSACTION_FEE
        - RETURN
        - STAKE
        - UNSTAKE
        - CLAIM
        - STAKING_REWARD
        - DELEGATION_REWARD
      title: SubaccountTransactionType
    SubaccountTransactionStatus:
      description: |
        A string describing the status of the given transaction


        * POSTED - This transaction has been completed and is confirmed on the blockchain.


        * CANCELED - This transaction has been cancel. Funds were not successfully transferred.


        * PENDING - This transaction has been queued and the funds are being held until the transaction is POSTED or CANCELED.
      type: string
      enum:
        - POSTED
        - PENDING
        - CANCELED
      title: SubaccountTransactionStatus
    SubaccountTransactionAmount:
      type: object
      properties:
        assetType:
          description: |-
            A string representing a type of crypto-asset, which usually corresponds to the crypto asset's ticker symbol. Use `/asset-types` to list all of the supported asset types for your organization.

            * Posted - Amount is fully settled and available

            * Hold - Amount is held and not available

            * Pending - Amount is available for trading but not for withdrawal as it not settled yet

            * A list with the supported types of balance available for this asset and transaction
          type: string
          example: BTC
        balances:
          type: array
          items:
            type: object
            properties:
              amount:
                type: string
              balanceType:
                type: string
      title: SubaccountTransactionAmount
    SubaccountTransactionEntry:
      type: object
      properties:
        amounts:
          type: array
          items:
            $ref: '#/components/schemas/SubaccountTransactionAmount'
        subaccountId:
          description: Unique Identifier for the subaccount
          type: string
          example: ec761b5e-fd2c-497a-a9a0-f8738ac97bdf
      title: SubaccountTransactionEntry
    SubaccountTransaction:
      type: object
      properties:
        createdAt:
          description: The timestamp when the transaction request was created.
          type: string
          format: date-time
          example: '2019-01-02T12:34:56.000Z'
        endedAt:
          description: The timestamp when the transaction request reached a final state - POSTED or CANCELED (optional).
          type: string
          format: date-time
          example: '2019-01-03T12:34:56.000Z'
          nullable: true
        status:
          $ref: '#/components/schemas/SubaccountTransactionStatus'
        subaccounts:
          type: array
          items:
            $ref: '#/components/schemas/SubaccountTransactionEntry'
        transactionId:
          description: The transaction ID which can be used to reference this transaction in other queries.
          type: string
          example: c4c4652f-0c07-472c-a7f8-955fbe07775d
        transactionType:
          $ref: '#/components/schemas/SubaccountTransactionType'
      example:
        transactionId: c4c4652f-0c07-472c-a7f8-955fbe07775d
        subaccounts:
          - subaccountId: ec761b5e-fd2c-497a-a9a0-f8738ac97bdf
            balances:
              - assetType: BTC
                hold: '1000.00'
                pending: '1000.00'
                posted: '1000.00'
        status: POSTED
        createdAt: '2019-01-02T12:34:56.000Z'
        endedAt: '2019-01-03T12:34:56.000Z'
        transactionType: WITHDRAWAL
      required:
        - transactionId
        - status
        - subaccounts
        - createdAt
      title: SubaccountTransaction
    SubaccountTransactionsResponse:
      type: object
      properties:
        data:
          type: array
          items:
            $ref: '#/components/schemas/SubaccountTransaction'
        page:
          $ref: '#/components/schemas/Page'
      required:
        - data
      title: SubaccountTransactionsResponse
    SubaccountsResponse:
      type: object
      properties:
        data:
          type: array
          items:
            $ref: '#/components/schemas/SubaccountsDetails'
        page:
          $ref: '#/components/schemas/Page'
      required:
        - data
      title: SubaccountsResponse
    SubaccountsDetails:
      type: object
      properties:
        accruedFees:
          type: array
          items:
            $ref: '#/components/schemas/AccruedFeeType'
          example:
            - startPeriod: '2024-06-01'
              endPeriod: '2024-06-15'
              accruedValue: '1.21'
              rate: 0.01
              type: MANAGEMENT
              totalBalanceInUSD: '121.33'
              state: ONGOING
            - startPeriod: '2024-05-01'
              endPeriod: '2024-05-31'
              accruedValue: '1.12'
              rate: 0.01
              type: MANAGEMENT
              totalBalanceInUSD: '112.33'
              state: DONE
            - startPeriod: '2024-04-01'
              endPeriod: '2024-04-30'
              accruedValue: '1.21'
              rate: 0.01
              type: MANAGEMENT
              totalBalanceInUSD: '121.33'
              state: DONE
            - startPeriod: '2024-06-01'
              endPeriod: '2024-06-15'
              accruedValue: '1.21'
              rate: 0.01
              type: MODEL
              totalBalanceInUSD: '121.33'
              state: ONGOING
            - startPeriod: '2024-05-01'
              endPeriod: '2024-05-31'
              accruedValue: '1.21'
              rate: 0.01
              type: MODEL
              totalBalanceInUSD: '121.33'
              state: DONE
            - startPeriod: '2024-04-01'
              endPeriod: '2024-04-30'
              accruedValue: '1.21'
              rate: 0.01
              type: MODEL
              totalBalanceInUSD: '121.33'
              state: DONE
        balances:
          type: array
          items:
            $ref: '#/components/schemas/BalanceDetails'
        createdAt:
          description: The timestamp when the subaccount was created.
          type: string
          format: date-time
          example: '2019-01-02T12:34:56.000Z'
        customerId:
          description: |-
            Unique identifier for the customer

            DEPRECATED, please use `customers` field instead
          type: string
        customers:
          $ref: '#/components/schemas/SubaccountCustomers'
        externalSubaccountId:
          description: The external unique identifier used to identify this subaccount
          type: string
        fees:
          type: array
          items:
            $ref: '#/components/schemas/FeeDetailType'
          example:
            - type: ADVISORY
              rate: 0.01
              startDate: '2023-08-01'
              isBillable: true
            - type: MODEL
              rate: 0.01
              startDate: '2023-08-01'
              isBillable: true
            - type: MANAGEMENT
              rate: 0.01
              startDate: '2023-08-01'
              isBillable: true
            - type: CUSTODY
              rate: 0.01
              startDate: '2023-08-01'
              isBillable: true
        name:
          description: The name of the subaccount
          type: string
        status:
          $ref: '#/components/schemas/SubaccountStatus'
        subaccountId:
          description: Unique Identifier for the subaccount
          type: string
          example: ec761b5e-fd2c-497a-a9a0-f8738ac97bdf
        subType:
          $ref: '#/components/schemas/SubaccountSubType'
        type:
          $ref: '#/components/schemas/SubaccountType'
      required:
        - subaccountId
        - name
        - customerId
        - externalSubaccountId
        - balances
        - fees
        - createdAt
        - accruedFees
      title: SubaccountsDetails
    SubaccountCustomer:
      description: Unique Identifier and role for the program customer in subaccount
      type: object
      properties:
        customerId:
          description: Unique Identifier for the program customer
          type: string
        role:
          description: Role of the program customer in the subaccount
          type: string
          enum:
            - PRIMARY
            - SECONDARY
    SubaccountCustomers:
      description: List of account owners with their respective roles (can only be changed during onboarding)
      type: array
      items:
        $ref: '#/components/schemas/SubaccountCustomer'
    AccruedFeeType:
      type: object
      properties:
        accruedValue:
          description: Accrued fee value for the period.
          type: string
        endPeriod:
          description: 'The end date (inclusive) in `YYYY-MM-DD` format of the period accrued. Dates are always in UTC [RFC 3339](https://datatracker.ietf.org/doc/html/rfc3339#section-5.6) ''full-date''.'
          type: string
          format: date
        rate:
          description: The rate should be in percentage format. The rate should be a value between 0 and 1 where 0.01 is 1%.
          type: number
          maximum: 1
          minimum: 0
        startPeriod:
          description: 'The start date (inclusive) in `YYYY-MM-DD` format of the period accrued. Dates are always in UTC [RFC 3339](https://datatracker.ietf.org/doc/html/rfc3339#section-5.6) ''full-date''.'
          type: string
          format: date
        state:
          $ref: '#/components/schemas/FeeCalculationStateType'
        totalBalanceInUSD:
          description: Assets under custody value in USD at the time of accrual.
          type: string
        type:
          $ref: '#/components/schemas/FeeType'
      required:
        - startPeriod
        - endPeriod
        - accruedValue
        - type
        - rate
        - state
      title: AccruedFee
    Balance:
      type: object
      properties:
        amount:
          type: string
        description:
          description: A description of the balance type and its meaning
          type: string
      title: Balance
    BalanceDetails:
      type: object
      properties:
        assetType:
          description: 'A string representing a type of crypto-asset, which usually corresponds to the crypto asset''s ticker symbol. Use `/asset-types` to list all of the supported asset types for your organization.'
          type: string
          example: BTC
        availableForTrading:
          type: string
        availableForWithdrawal:
          type: string
        entries:
          type: array
          items:
            $ref: '#/components/schemas/Balance'
        totalBalance:
          type: string
      title: BalanceDetails
    SubaccountTransactionsByIdResponse:
      type: object
      properties:
        data:
          type: array
          items:
            $ref: '#/components/schemas/SubaccountTransaction'
        page:
          $ref: '#/components/schemas/Page'
      required:
        - data
      title: SubaccountTransactionsByIdResponse
    CreateSubaccountTransactionRequest:
      description: Details of the transactions to create
      type: object
      properties:
        transactions:
          type: array
          items:
            $ref: '#/components/schemas/CreateSubaccountTransaction'
          maxItems: 100
          minItems: 1
      required:
        - transactions
      title: CreateSubaccountTransactionRequest
    CreateSubaccountTransaction:
      description: Details of a transaction to create
      type: object
      properties:
        amount:
          description: The amount to transfer
          type: string
          example: '1000.00'
        assetType:
          description: 'A string representing a type of crypto-asset, which usually corresponds to the crypto asset''s ticker symbol. Use `/asset-types` to list all of the supported asset types for your organization.'
          type: string
          example: BTC
        destinationSubaccountId:
          description: Unique Identifier for the subaccount
          type: string
          example: 3eeaf765-0df2-49c9-9e1f-db9cf3e796dd
        idempotentId:
          description: A client-provided unique ID for idempotent transaction
          type: string
          example: '12838927347'
          maxLength: 128
        sourceSubaccountId:
          description: Unique Identifier for the subaccount
          type: string
          example: ec761b5e-fd2c-497a-a9a0-f8738ac97bdf
        transactionMemo:
          description: A memo to be included with the transaction
          type: string
          example: This is a memo
      required:
        - sourceSubaccountId
        - destinationSubaccountId
        - assetType
        - amount
        - idempotentId
      title: CreateSubaccountTransaction
    CreateSubaccountTransactionResponse:
      type: object
      properties:
        data:
          $ref: '#/components/schemas/TransactionIdResponse'
      required:
        - data
      title: CreateSubaccountTransactionResponse
    TransactionIdResponse:
      type: object
      properties:
        transactionIds:
          type: array
          items:
            type: object
            properties:
              idempotentId:
                description: A client-provided unique ID for idempotent transaction
                type: string
                example: '12838927347'
                maxLength: 128
              transactionId:
                description: Unique Identifier for the transaction
                type: string
                example: c4c4652f-0c07-472c-a7f8-955fbe07775d
            required:
              - transactionId
              - idempotentId
      title: TransactionIdResponse
    DestinationAddress:
      description: Information related to the Address of the Benificiary
      type: object
      properties:
        address:
          description: Street Address
          type: string
          maxLength: 35
        address2:
          description: Street Address Continued
          type: string
          maxLength: 35
        city:
          description: City of the Address
          type: string
        country:
          description: Country of the Address
          type: string
        state:
          description: State of the Address
          type: string
        zipcode:
          description: Zip Code of the Address
          type: string
      example:
        address: 123 Main Street
        city: Windsor
        state: Iowa
        zipcode: '12312'
      required:
        - address
        - city
        - state
        - zipcode
      title: DestinationAddress
    RoutingDetails:
      type: object
      properties:
        address:
          $ref: '#/components/schemas/DestinationAddress'
        code:
          type: string
          enum:
            - ABA
            - BIC
            - DDA
        id:
          type: string
        name:
          description: Name of the Beneficiary
          type: string
      required:
        - id
        - code
      title: RoutingDetails
    UpdateTaxTransactionRequest:
      type: object
      properties:
        acquisitionDatetime:
          description: ISO-8601 timestamp representing when the lot was acquired.
          type: string
          format: date-time
        assetType:
          description: A string representing the asset type of the transaction.
          type: string
          example: BTC
        data:
          $ref: '#/components/schemas/TaxTransactionCostBasis'
        lots:
          description: An Array of the Tax lots that are part of this transaction
          type: array
          items:
            $ref: '#/components/schemas/TransactionTaxLot'
          minItems: 1
          uniqueItems: true
        type:
          description: A string representing the type of the transaction. Must match the original transaction type.
          type: string
          example: DEPOSIT
          enum:
            - DEPOSIT
            - WITHDRAW
      required:
        - type
      title: UpdateTransactionRequest
    UpdateTaxTransactionResponse:
      type: object
      properties:
        data:
          $ref: '#/components/schemas/UpdateTaxTransactionResponseId'
      required:
        - data
      title: UpdateTransactionResponse
    UpdateTaxTransactionResponseId:
      type: object
      properties:
        transactionId:
          description: The unique identifier of the transaction.
          type: string
          example: 9cd9f4d4-078b-4e44-a308-7662fec0f546
      required:
        - transactionId
      title: UpdateTransactionResponseId
    TagTaxTransactionRequest:
      type: object
      properties:
        accountId:
          description: The subaccount for which the transaction happened.
          type: string
          example: SubaccountID
        distributionCode:
          description: |-
            IRS distribution code for Form 1099-R. Required when tag is 'distribution'.

            Single codes:
            - `1`: Early distribution, no known exception
            - `2`: Early distribution, exception applies
            - `3`: Disability
            - `4`: Death
            - `7`: Normal distribution
            - `8`: Excess contributions plus earnings/excess deferrals taxable in current year
            - `B`: Designated Roth account distribution
            - `G`: Direct rollover and direct payment
            - `H`: Direct rollover of a designated Roth account distribution to a Roth IRA
            - `J`: Early distribution from a Roth IRA, no known exception
            - `K`: Distribution of traditional IRA assets not having a readily available FMV
            - `N`: Recharacterized IRA contribution made for current year
            - `P`: Excess contributions plus earnings/excess deferrals taxable in prior year
            - `Q`: Qualified distribution from a Roth IRA
            - `R`: Recharacterized IRA contribution made for prior year
            - `S`: Early distribution from a SIMPLE IRA in first 2 years, no known exception
            - `T`: Roth IRA distribution, exception applies

            Combination codes (two codes that apply to a single distribution):
            `18`, `1B`, `1K`, `1P`, `28`, `2B`, `2K`, `2P`, `48`, `4B`, `4G`, `4H`, `4K`, `4P`, `6B`,
            `7B`, `7K`, `81`, `82`, `84`, `8B`, `8J`, `8K`, `B1`, `B2`, `B4`, `B7`, `B8`, `BG`, `BL`,
            `BP`, `G4`, `GB`, `GK`, `H4`, `J8`, `JP`, `K1`, `K2`, `K4`, `K7`, `K8`, `KG`, `LB`, `P1`,
            `P2`, `P4`, `PB`, `PJ`
          type: string
          example: '7'
          enum:
            - '1'
            - '2'
            - '3'
            - '4'
            - '7'
            - '8'
            - B
            - G
            - H
            - J
            - K
            - 'N'
            - P
            - Q
            - R
            - S
            - T
            - '18'
            - 1B
            - 1K
            - 1P
            - '28'
            - 2B
            - 2K
            - 2P
            - '48'
            - 4B
            - 4G
            - 4H
            - 4K
            - 4P
            - 6B
            - 7B
            - 7K
            - '81'
            - '82'
            - '84'
            - 8B
            - 8J
            - 8K
            - B1
            - B2
            - B4
            - B7
            - B8
            - BG
            - BL
            - BP
            - G4
            - GB
            - GK
            - H4
            - J8
            - JP
            - K1
            - K2
            - K4
            - K7
            - K8
            - KG
            - LB
            - P1
            - P2
            - P4
            - PB
            - PJ
        postponedLateReason:
          description: Reason for postponed contribution or late rollover. Required when tag is 'postponed' or 'late-rollover'.
          type: string
          example: qualified-disaster
        tag:
          description: Tag to be attributed to the transaction.
          type: string
          example: contribution
          enum:
            - contribution
            - transfer-in
            - conversion
            - distribution
            - transfer-out
            - recharacterization
            - late-rollover
            - postponed
            - rollover
        taxYear:
          description: The fiscal year the transaction belongs to.
          type: string
          example: '2024'
        totalDistribution:
          description: 'Deprecated: This field is ignored. Total distribution is now auto-computed from account balances.'
          type: boolean
          example: true
          nullable: true
          x-deprecated: true
      title: UpdateTransactionRequest
    TagTaxTransactionResponse:
      type: object
      properties:
        data:
          type: object
          properties:
            status:
              description: The status of the tagging request.
              type: string
              example: accepted
          required:
            - status
      required:
        - data
      title: TagTransactionResponse
    UntagTaxTransactionResponse:
      type: object
      properties:
        data:
          type: object
          properties:
            status:
              description: The status of the tag removal request.
              type: string
              example: accepted
          required:
            - status
      required:
        - data
      title: UntagTransactionResponse
    TaxTransactionsResponse:
      type: object
      properties:
        data:
          type: array
          items:
            $ref: '#/components/schemas/TaxTransaction'
          example:
            - id: 9cd9f4d4-078b-4e44-a308-7662fec0f546
              type: DEPOSIT
              transactionTime: '2022-07-30T22:15:31.99999Z'
              received:
                assetType: BTC
                costBasis: '2500'
                quantity: '1.0'
            - id: 3459f4d4-078b-4e44-a308-7662fec0f546
              type: WITHDRAW
              transactionTime: '2022-07-30T22:15:31.99999Z'
              sent:
                assetType: BTC
                costBasis: '2500'
                quantity: '1.0'
            - id: a2b4f4d4-078b-4e44-a308-7662fec0f546
              type: TRADE
              transactionTime: '2022-07-30T22:15:31.99999Z'
              received:
                assetType: USD
                costBasis: '1'
                quantity: '2500'
              sent:
                assetType: BTC
                costBasis: '2500'
                quantity: '1.0'
              fee:
                assetType: USD
                costBasis: '1'
                quantity: '0.01'
          minItems: 0
          uniqueItems: true
      required:
        - data
      title: TransactionsResponse
    TaxTransaction:
      description: Details of a transaction
      type: object
      properties:
        externalId:
          description: The unique identifier of the transaction in an external system orderID for trades and transactionID for deposits/withdraws
          type: string
          example: 9be748be-d760-4d36-90f8-86b699c4e8bd
        fee:
          $ref: '#/components/schemas/TaxTransactionCostBasis'
        feeAsset:
          description: 'The fee of the transaction, currently this is always in USD.'
          type: array
          items:
            $ref: '#/components/schemas/TaxTransactionCostBasis'
        id:
          description: The unique identifier of the transaction.
          type: string
          example: 9cd9f4d4-078b-4e44-a308-7662fec0f546
        received:
          $ref: '#/components/schemas/TaxTransactionCostBasis'
        receivedAsset:
          description: 'The received asset of a deposit transaction, or the bought asset of a trade transaction.'
          type: array
          items:
            $ref: '#/components/schemas/TaxTransactionCostBasis'
        sent:
          $ref: '#/components/schemas/TaxTransactionCostBasis'
        sentAsset:
          description: 'The sent asset of a withdraw transaction, or the sold asset of a trade transaction.'
          type: array
          items:
            $ref: '#/components/schemas/TaxTransactionCostBasis'
        transactionTime:
          description: ISO-8601 format date time when the transaction occurred.
          type: string
          format: date-time
          example: '2022-07-30T22:15:31.99999Z'
        type:
          description: A string representing the type of the transaction.
          type: string
          example: DEPOSIT
          enum:
            - DEPOSIT
            - WITHDRAW
            - TRADE
      required:
        - id
        - type
        - transactionTime
      title: Transaction
    TaxTransactionCostBasis:
      description: Details of the transaction cost basis
      type: object
      properties:
        assetType:
          description: A string representing the asset type of the transaction.
          type: string
          example: BTC
        costBasis:
          description: The cost basis of the transaction.
          type: string
          example: '2500'
        quantity:
          description: The quantity of the transaction.
          type: string
          example: '1.0'
      required:
        - assetType
        - quantity
      title: TransactionCostBasis
    InventoryForAssetResponse:
      type: object
      properties:
        data:
          $ref: '#/components/schemas/InventoryForAsset'
      title: InventoryForAssetResponse
    InventoryForAsset:
      type: object
      properties:
        summary:
          type: object
          properties:
            assetType:
              description: Asset type identifier.
              type: string
            averageUnitCost:
              description: Average cost of a unit of the Asset.
              type: string
            costBasis:
              description: The cost basis of the asset.
              type: string
              example: '2500.23'
            lots:
              type: array
              items:
                $ref: '#/components/schemas/InventoryTaxLots'
            quantity:
              description: Quantity of asset.
              type: string
              example: '5.5'
            totalQuantityMissingCostBasis:
              description: Quantity of an asset that does not have a cost basis associated
              type: string
              example: '2.5'
            totalQuantityWithCostBasis:
              description: Quantity of an asset that has a cost basis associated
              type: string
              example: '3'
      title: InventoryForAsset
    InventoryTaxLots:
      type: object
      properties:
        acquisitionDatetime:
          description: ISO-8601 timestamp representing when the lot was acquired.
          type: string
          format: date-time
        cost:
          description: Cost basis of the lot. Will not Not appear if the lot is missing cost basis.
          type: string
        id:
          description: Identifier for the Lot
          type: string
        quantity:
          description: Amount of the Asset in the lot
          type: string
        unitCost:
          description: Cost of a unit of the ASset within the lot. Will not appear if the lot doesn't have cost basis
          type: string
      title: InventoryTaxLots
    TransactionTaxLot:
      type: object
      properties:
        acquisitionDatetime:
          description: ISO-8601 timestamp representing when the lot was acquired.
          type: string
          format: date-time
        cost:
          description: Cost basis of the lot. Will not Not appear if the lot is missing cost basis.
          type: string
        quantity:
          description: Amount of the Asset in the lot
          type: string
      required:
        - quantity
        - cost
      title: TransactionTaxLot
    InventorySummaryResponse:
      type: object
      properties:
        data:
          type: array
          items:
            $ref: '#/components/schemas/InventorySummary'
          example:
            - assetType: BTC
              quantity: '5.5'
              costBasis: '2500.23'
            - assetType: BTC
              quantity: '53.5'
              costBasis: '3600.23'
          minItems: 0
          uniqueItems: false
      required:
        - data
      title: InventorySummaryResponse
    InventorySummary:
      description: Details of the inventory Summary
      type: object
      properties:
        assetType:
          description: A string representing the asset type
          type: string
          example: BTC
        costBasis:
          description: The cost basis of the asset.
          type: string
          example: '2500.23'
        quantity:
          description: Quantity of asset.
          type: string
          example: '5.5'
        quantityWithCostBasis:
          description: Quantity of an asset that has a cost basis associated.
          type: string
          example: '3'
        quantityWithoutCostBasis:
          description: Quantity of an asset that doesn't have a cost basis associated.
          type: string
          example: '2.5'
      required:
        - assetType
        - costBasis
        - quantity
      title: InventorySummary
    TaxGainsCostBasisResponse:
      type: object
      properties:
        data:
          type: array
          items:
            $ref: '#/components/schemas/TaxGainsCostBase'
          example:
            - sold:
                assetType: BTC
                quantity: '0.1'
              proceeds:
                assetType: USD
                quantity: '300'
              taxYear: '2023'
              saleDate: '2022-06-30T22:15:31.99999Z'
              gainType: LONG_TERM
              gain:
                assetType: USD
                quantity: '20000'
              cost:
                assetType: USD
                quantity: '305'
            - sold:
                assetType: ETH
                quantity: '1'
              proceeds:
                assetType: USD
                quantity: '1850'
              taxYear: '2023'
              saleDate: '2023-06-30T22:15:31.99999Z'
              gainType: SHORT_TERM
              gain:
                assetType: USD
                quantity: '150'
              cost:
                assetType: USD
                quantity: '1880'
          minItems: 0
          uniqueItems: false
      required:
        - data
      title: TaxGainsCostBasisResponse
    TaxGainsCostBase:
      description: Details of gains costs base
      type: object
      properties:
        acquisitionTxId:
          description: The unique identifier of the transaction where the asset was acquired in the tax system.
          type: string
        cost:
          $ref: '#/components/schemas/TaxGainsAmount'
        costBasisDate:
          description: ISO-8601 format date time of the Cost Basis date
          type: string
          format: date-time
          nullable: true
        dispositionTxId:
          description: The unique identifier of the transaction where the asset was sold in the tax system.
          type: string
        externalAcquisitionTxId:
          description: The unique identifier of the transaction where the asset was acquired in the external system.
          type: string
        externalDispositionTxId:
          description: The unique identifier of the transaction where the asset was sold in the external system.
          type: string
        gain:
          $ref: '#/components/schemas/TaxGainsAmount'
        gainType:
          description: A string representing the gain type
          type: string
          example: LONG_TERM
          enum:
            - LONG_TERM
            - SHORT_TERM
        proceeds:
          $ref: '#/components/schemas/TaxGainsAmount'
        saleDate:
          description: ISO-8601 format date time of the sale date
          type: string
          format: date-time
          example: '2022-07-30T22:15:31.99999Z'
        sold:
          $ref: '#/components/schemas/TaxGainsAmount'
        taxYear:
          description: The tax year of the sale
          type: string
          example: '2023'
      required:
        - sold
        - proceeds
        - taxYear
        - saleDate
        - gainType
      title: TaxGainsCostBase
    TaxGainsResponse:
      type: object
      properties:
        data:
          $ref: '#/components/schemas/TaxGains'
      required:
        - data
      title: TaxGainsResponse
    TaxGains:
      description: 'Breakdown of tax gains into short term, long term and total'
      type: object
      properties:
        longTerm:
          $ref: '#/components/schemas/TaxGainsAmount'
        shortTerm:
          $ref: '#/components/schemas/TaxGainsAmount'
        total:
          $ref: '#/components/schemas/TaxGainsAmount'
      example:
        shortTerm:
          assetType: USD
          quantity: '20204.23'
        longTerm:
          assetType: USD
          quantity: '200304.1'
        total:
          assetType: USD
          quantity: '220308.33'
      title: TaxGains
    TaxGainsAmount:
      description: Summary of tax amount
      type: object
      properties:
        assetType:
          description: A string representing the asset type
          type: string
          example: USD
        quantity:
          description: Gain or loss quantity
          type: string
          example: '5.5'
      required:
        - assetType
        - quantity
      title: TaxGainsAmount
    TaxFormsResponse:
      type: object
      properties:
        data:
          type: array
          items:
            $ref: '#/components/schemas/TaxForms'
          example:
            - subaccountId: ID
              forms:
                - createdDate: '2022-06-03T00:53:27.645Z'
                  id: doc-123e4567-e89b-12d3-a456-426614174000
                  revision: 1
                  revisionType: ORIGINAL
                  formType: 1099B
                  downloadLink: URL_TO_USER
                  year: 2023
                  isFiled: true
          minItems: 0
          uniqueItems: false
      required:
        - data
      title: TaxFormsResponse
    TaxForms:
      description: Generated Tax Forms for a subaccount
      type: object
      properties:
        forms:
          description: Tax Forms generated for the specified subaccount
          type: array
          items:
            $ref: '#/components/schemas/TaxFormItem'
          example:
            - formType: 1099B
              downloadLink: URL_TO_USER
          minItems: 0
          uniqueItems: false
        subaccountId:
          description: ID for the subaccount for which the forms were generated
      example:
        subaccountId: ID
        forms:
          - createdDate: '2022-06-03T00:53:27.645Z'
            id: doc-123e4567-e89b-12d3-a456-426614174000
            revision: 1
            revisionType: ORIGINAL
            formType: 1099B
            downloadLink: URL_TO_USER
            year: 2023
            isFiled: true
      required:
        - subaccountId
      title: TaxForms
    TaxFormItem:
      description: Information about a generated tax form
      type: object
      properties:
        createdDate:
          description: ISO-8601 format date time when the tax form was created
          type: string
          format: date-time
          example: '2022-06-03T00:53:27.645Z'
        downloadLink:
          description: A URL to download the generated tax form item
          type: string
          example: URL_TO_USER
        formType:
          description: The type of the generated tax form
          type: string
          example: 1099B
        id:
          description: The unique identifier of the tax form
          type: string
          example: doc-123e4567-e89b-12d3-a456-426614174000
        isFiled:
          description: Indicates whether the tax form has been filed
          type: boolean
          example: true
        revision:
          description: The revision number of the tax form
          type: integer
          format: int32
          example: 1
        revisionType:
          description: The type of revision for the tax form
          type: string
          example: ORIGINAL
        year:
          description: The tax year for which the form was generated
          type: integer
          format: int32
          example: 2023
      required:
        - formType
        - downloadLink
      title: TaxFormItem
    VaultsWalletsRequest:
      type: object
      properties:
        activateAllCompatibleNetworks:
          description: 'When `true`, activate the new wallet on every network that is key-compatible with `networkId` and enabled for your organization — the same set returned by `compatibleNetworkIds` on `/asset-types` — without enumerating them. Mutually exclusive with `compatibleNetworkIds`; supplying both is rejected with a `400`.'
          type: boolean
        compatibleNetworkIds:
          description: Optional list of additional compatible network IDs to activate this wallet on. All networks must share the same key family as the primary networkId. Activation on these networks happens synchronously after the initial wallet creation.
          type: array
          items:
            type: string
        networkId:
          description: The ID of the network for assets in this wallet.
          type: string
          example: BTC
        subaccountId:
          description: The Subaccount Identifier to link this wallet.(in development / early access)
          type: string
        walletName:
          description: The name of the Wallet.
          type: string
          example: Bitcoin Mainnet - Wallet 1
          nullable: true
      required:
        - networkId
      title: VaultsWalletsRequest
    VaultsWalletsResponse:
      type: object
      properties:
        data:
          type: array
          items:
            $ref: '#/components/schemas/WalletDetails'
        page:
          $ref: '#/components/schemas/Page'
      required:
        - data
        - page
      title: VaultsWalletsResponse
    VestingBalancesResponse:
      type: object
      properties:
        balance:
          $ref: '#/components/schemas/VestingBalance'
        walletInfo:
          $ref: '#/components/schemas/WalletInfo'
      required:
        - walletInfo
        - balance
      title: VestingBalancesResponse
    WalletDetails:
      type: object
      properties:
        assets:
          description: A list of the assets in this wallet. May be empty if the wallet has no active assets.
          type: array
          items:
            $ref: '#/components/schemas/AssetDetailsForWallet'
        depositAddress:
          $ref: '#/components/schemas/SignedAddressForWallet'
        depositInstruction:
          $ref: '#/components/schemas/DepositInstruction'
        derivationPath:
          description: 'The derivation path for this wallet''s key. It is present only for self-custody wallets whose keys are encrypted with a client-held control key, and is omitted otherwise. The value never changes for a given wallet, so clients can pass it as-is when deriving the child control key for an external transfer.'
          type: string
        isArchived:
          description: 'Indicates if the wallet has been archived. Archived wallets, by default, will appear in wallet listing APIs, though the caller can override the default filter to get just archived wallets if necessary.'
          type: boolean
          example: false
        isDefault:
          description: 'If `true` this wallet is the default wallet that is used for a particular asset when only a vault is specified. For example, a transfer between two vaults will take the asset from the default wallet for that asset in the sending vault and send it to the default wallet for that asset in the destination vault. Alternatively, a deposit into a vault where the wallet is not specified will deposit the funds into the default wallet for that asset.'
          type: boolean
        networkId:
          description: The Id of the network for assets in this wallet.
          type: string
        subaccountId:
          description: Subaccount Id for this order to book into.
          type: string
          example: 343b6c83-6d91-4f13-9982-2109abd2dbb0
        type:
          $ref: '#/components/schemas/ResourceType'
        vaultId:
          description: The ID of the vault containing the wallet
          type: string
        vaultName:
          description: The name of the vault containing the wallet
          type: string
        walletId:
          description: An ID uniquely identifying an Anchorage Digital wallet
          type: string
        walletName:
          description: The name of the Wallet.
          type: string
      example:
        walletId: 3d293c0d64c703023692216e9b4f5280
        walletName: Bitcoin Mainnet - Wallet 1
        depositAddress:
          address: 2N19AcihQ1a4MxQW658UFHTioUNnMkiHPkw
          addressId: a33f83d96ca95cac000a344aa478a8b8
          addressSignaturePayload: 7b225465787441646472657373223a22324e313941636968513161344d78515736353855464854696f554e6e4d6b6948506b77227d
          signature: 1642000aa9cca8e8610981aefbdb204b361c9dca3fa067b88fdacfba7a0f620d721378a33f4bbadad3923e633a4d712646d1e8e314e9fcb4aa4102c0581f6503
        assets:
          - assetType: BTC
            availableBalance:
              quantity: '10.00000000'
              assetType: BTC
              currentPrice: '9751.01'
              currentUSDValue: '97510.1'
            totalBalance:
              quantity: '10.45234733'
              assetType: BTC
              currentPrice: '9751.01'
              currentUSDValue: '101920.94'
            stakedBalance:
              quantity: '32.00000000'
              assetType: BTC
              currentPrice: '9751.01'
              currentUSDValue: '312032.32'
            unclaimedBalance:
              quantity: '0'
              assetType: BTC
              currentPrice: '9751.01'
              currentUSDValue: '0'
            unvestedBalance:
              quantity: '0'
              assetType: BTC
              currentPrice: '9751.01'
              currentUSDValue: '0'
            unvestedUnstakeableBalance:
              quantity: '0'
              assetType: BTC
              currentPrice: '9751.01'
              currentUSDValue: '0'
        vaultId: 1c920f4241b78a1d483a29f3c24b6c4c
        vaultName: Long Hold Vault
        isDefault: true
        isArchived: false
        networkId: BTC
        type: WALLET
      required:
        - walletId
        - walletName
        - assets
        - vaultId
        - vaultName
        - isDefault
        - isArchived
        - networkId
        - type
      title: WalletDetails
    AssetDetailsForWallet:
      type: object
      properties:
        assetType:
          description: |
            A string representing a type of crypto-asset, which usually corresponds to the crypto asset's ticker symbol.

            Use `/asset-types` to list all of the supported asset types for your organization.
          type: string
          example: BTC
        availableBalance:
          $ref: '#/components/schemas/Amount'
        stakedBalance:
          $ref: '#/components/schemas/Amount'
        totalBalance:
          $ref: '#/components/schemas/Amount'
        unclaimedBalance:
          $ref: '#/components/schemas/Amount'
        unvestedBalance:
          $ref: '#/components/schemas/Amount'
        unvestedUnstakeableBalance:
          $ref: '#/components/schemas/Amount'
      example:
        assetType: BTC
        availableBalance:
          quantity: '10.00000000'
          assetType: BTC
          currentPrice: '9751.01'
          currentUSDValue: '97510.1'
        totalBalance:
          quantity: '10.45234733'
          assetType: BTC
          currentPrice: '9751.01'
          currentUSDValue: '101920.94'
        stakedBalance:
          quantity: '32.00000000'
          assetType: BTC
          currentPrice: '9751.01'
          currentUSDValue: '312032.32'
        unclaimedBalance:
          quantity: '0'
          assetType: BTC
          currentPrice: '9751.01'
          currentUSDValue: '0'
      required:
        - assetType
        - availableBalance
        - totalBalance
      title: AssetDetailsForWallet
    Data:
      type: object
      properties:
        result:
          $ref: '#/components/schemas/Result'
        signedAddress:
          $ref: '#/components/schemas/SignedAddress'
      required:
        - result
        - signedAddress
      title: Data
    Data3:
      type: object
      properties:
        status:
          $ref: '#/components/schemas/TransferStatus'
        transferId:
          description: 'The ID of this transfer, which can be used to retrieve further details'
          type: string
          example: 008d3ec72558ce907571886df63ef51594b5bd8cf106a0b7fa8f12a30dfc867f
      required:
        - transferId
        - status
      title: Data3
    Result:
      type: string
      enum:
        - RETURNING_UNUSED_ADDRESS
        - RETURNING_USED_ADDRESS
      title: Result
    TransferStatus:
      description: |
        A string describing the status of the given transfer


        * IN_PROGRESS - This transfer is in progress and is not final.


        * COMPLETED - This transfer has been completed and is confirmed on the blockchain.


        * FAILED - This transfer has failed. Funds were not successfully transferred.


        * QUEUED - This transfer has been queued behind another transfer of the same asset.
      type: string
      enum:
        - IN_PROGRESS
        - COMPLETED
        - FAILED
        - QUEUED
      title: TransferStatus
    WalletInfo:
      type: object
      properties:
        address:
          description: The public address of the wallet associated with this allocation
          type: string
          example: 0x1234567890abcdef...
        walletId:
          description: The ID of the wallet associated with this allocation
          type: string
          example: 3d293c0d64c703023692216e9b4f5280
      required:
        - walletId
        - address
      title: WalletInfo
    VestingBalance:
      type: object
      properties:
        assetType:
          description: 'A string representing a type of crypto-asset, which usually corresponds to the crypto asset''s ticker symbol.'
          type: string
          example: BTC
        availableBalance:
          description: Amount of tokens unlocked for this allocation
          type: string
          example: '1000.50000000'
        externalTokenId:
          description: The ID of the asset assigned by the external provider that funds these wallets
          type: string
          example: magna_token_123
        lockedBalance:
          description: Amount of tokens on hold to be released to this stakeholder for this allocation
          type: string
          example: '100.10000000'
        networkId:
          description: The network identifier for the blockchain network
          type: string
          example: ETHHOODI
        unvestedBalance:
          description: Amount of tokens still scheduled to be released to this stakeholder for this allocation
          type: string
          example: '500.25000000'
      required:
        - assetType
        - externalTokenId
        - networkId
        - availableBalance
        - unvestedBalance
        - lockedBalance
      title: VestingBalance
    GetVestingBalancesBatchRequest:
      type: object
      properties:
        allocationIds:
          description: List of allocation IDs to get vesting balances for
          type: array
          items:
            type: string
            minLength: 1
          maxItems: 100
          minItems: 1
        stakeholderId:
          description: 'The external stakeholder ID (optional, used to retrieve wallet info when no transactions exist yet)'
          type: string
      required:
        - allocationIds
      title: GetVestingBalancesBatchRequest
    VestingBalancesBatchResponse:
      type: object
      properties:
        errorCount:
          description: Number of allocations that failed
          type: integer
          example: 1
        results:
          description: Per-allocation vesting balance results
          type: array
          items:
            $ref: '#/components/schemas/VestingBalancesResult'
        successCount:
          description: Number of allocations successfully processed
          type: integer
          example: 3
      required:
        - results
        - successCount
        - errorCount
      title: VestingBalancesBatchResponse
    VestingBalancesResult:
      type: object
      properties:
        allocationId:
          description: The allocation ID this result corresponds to
          type: string
          example: alloc-123
        balance:
          $ref: '#/components/schemas/VestingBalance'
        error:
          description: 'Error message if this allocation failed, null on success'
          type: string
          nullable: true
        walletInfo:
          $ref: '#/components/schemas/WalletInfo'
      required:
        - allocationId
      title: VestingBalancesResult
    WalletRewardsResponse:
      type: object
      properties:
        data:
          type: array
          items:
            $ref: '#/components/schemas/WalletRewardsDetails'
        page:
          $ref: '#/components/schemas/Page'
      required:
        - data
        - page
      title: WalletRewardsResponse
    WalletPositionsResponse:
      type: object
      properties:
        data:
          type: array
          items:
            $ref: '#/components/schemas/WalletPositionsDetails'
        page:
          $ref: '#/components/schemas/Page'
      required:
        - data
        - page
      title: WalletPositionsResponse
    WalletRewardsDetails:
      properties:
        assetType:
          description: |
            A string representing a type of crypto-asset, which usually corresponds to the crypto asset's ticker symbol.

            Use `/asset-types` to list all of the supported asset types for your organization.
          type: string
          example: BTC
        referenceDate:
          description: The reference date of the reward
          type: string
          format: date
          example: '2024-01-02'
        rewardAmount:
          description: 'The numeric value of this amount, excluding units'
          type: string
          example: '0.23133'
        rewardType:
          description: 'The numeric value of this amount, excluding units'
          type: string
          enum:
            - UNCLAIMED
            - CLAIMED
      example:
        assetType: ETH
        rewardAmount: '0.021'
        rewardType: UNCLAIMED
        referenceDate: '2024-08-10'
      required:
        - assetType
        - rewardAmount
        - rewardType
        - referenceDate
      title: WalletRewardsDetails
    WalletPositionsDetails:
      properties:
        assetType:
          description: |
            A string representing a type of crypto-asset, which usually corresponds to the crypto asset's ticker symbol.

            Use `/asset-types` to list all of the supported asset types for your organization.
          type: string
          example: BTC
        inactiveStakedAmount:
          description: 'The numeric value of this amount, excluding units'
          type: string
          example: '0.23133'
        providerName:
          description: Provider name of the staking position
          type: string
          example: Figment
        sourceAddress:
          description: A crypto address for the intended asset that originated this position
          type: string
          example: 2N19AcihQ1a4MxQW658UFHTioUNnMkiHPkw
        stakedAmount:
          description: 'The numeric value of this amount, excluding units'
          type: string
          example: '0.23133'
        stakingPositionId:
          description: Unique identifier of the staking position
          type: string
          example: 9bc4c2ccba8192b64d41b46d1770abe9ddbb430b85de3fe73e1b4f21336bc48a
        status:
          description: The status of the staking position
          type: string
          enum:
            - PENDING
            - ACTIVE
            - EXITED
        transactionId:
          description: The transaction Id which created this staking position
          type: string
        withdrawalAddress:
          description: A crypto address for the intended asset to where the funds will be withdrawn
          type: string
          example: 2N19AcihQ1a4MxQW658UFHTioUNnMkiHPkw
      example:
        stakingPositionId: 9bc4c2ccba8192b64d41b46d1770abe9ddbb430b85de3fe73e1b4f21336bc48a
        assetType: ETH
        stakedAmount: '32'
        inactiveStakedAmount: '0'
        status: ACTIVE
        providerName: Figment
        sourceAddress: 2N19AcihQ1a4MxQW658UFHTioUNnMkiHPkw
        withdrawalAddress: 2N19AcihQ1a4MxQW658UFHTioUNnMkiHPkw
        transactionId: 8696144cca28a634c05858d00e51191408498a7808a837fc4645b4b6997dde09
      required:
        - stakingPositionId
        - assetType
        - stakedAmount
        - inactiveStakedAmount
        - status
        - sourceAddress
        - withdrawalAddress
        - providerName
        - transactionId
      title: WalletPositionsDetails
    SimpleSourceResourceType:
      description: The type of the resource being referenced.
      type: string
      enum:
        - WALLET
      title: SimpleSourceResourceType
    SimpleSourceResourceDetails:
      description: |
        An object representing a resource capable of sending funds.


        Construction example:

          ```
          {
          "id":"1c920f4241b78a1d483a29f3c24b6c4c",
          "type":"WALLET"
          }
          ```
      type: object
      properties:
        id:
          description: The identifier of the resource
          type: string
          example: 1c920f4241b78a1d483a29f3c24b6c4c
        type:
          $ref: '#/components/schemas/SimpleSourceResourceType'
      required:
        - id
        - type
      title: SimpleSourceResourceDetails
    CreateStakeRequest:
      type: object
      properties:
        amount:
          description: 'An amount of a crypto-asset to transfer, without units. The unit is derived from the asset type.'
          type: string
          example: '32'
        assetType:
          description: |
            A string representing a type of crypto-asset, which usually corresponds to the crypto asset's ticker symbol.

            Use `/asset-types` to list all of the supported asset types for your organization.
          type: string
          example: ETH
        description:
          description: An optional string providing more context to this transaction. It will be visible on the Anchorage Digital iOS app and will not be published to the blockchain.
          type: string
          example: 'Internal ID: #12838927347'
          nullable: true
        idempotentId:
          description: A client-provided unique ID for idempotent requests
          type: string
          example: '12838927347'
          maxLength: 128
        parameters:
          $ref: '#/components/schemas/StakingParameters'
        source:
          $ref: '#/components/schemas/SimpleSourceResourceDetails'
      required:
        - assetType
        - amount
        - idempotentId
        - source
      title: CreateStakeRequest
    CreateUnstakeRequest:
      type: object
      properties:
        amount:
          description: 'An amount of a crypto-asset to unstake, without units. The unit is derived from the asset type.'
          type: string
          example: '32'
          nullable: true
        assetType:
          description: |
            A string representing a type of crypto-asset, which usually corresponds to the crypto asset's ticker symbol.

            Use `/asset-types` to list all of the supported asset types for your organization.
          type: string
          example: ETH
        description:
          description: An optional string providing more context to this transaction. It will be visible on the Anchorage Digital iOS app and will not be published to the blockchain.
          type: string
          example: 'Internal ID: #12838927347'
          nullable: true
        idempotentId:
          description: A client-provided unique ID for idempotent requests
          type: string
          example: '12838927347'
          maxLength: 128
        isFullAmount:
          description: 'Specifies whether to unstake the full amount, which overrides any provided amount if set to true.'
          type: boolean
          default: false
        source:
          $ref: '#/components/schemas/SimpleSourceResourceDetails'
        stakingPositionId:
          description: Unique identifier of the staking position
          type: string
          example: 9bc4c2ccba8192b64d41b46d1770abe9ddbb430b85de3fe73e1b4f21336bc48a
      required:
        - assetType
        - idempotentId
        - source
      title: CreateUnstakeRequest
    CreateStakeResponse:
      type: object
      properties:
        data:
          $ref: '#/components/schemas/CreateStakeDetails'
      required:
        - data
      title: CreateStakeResponse
    CreateUnstakeResponse:
      type: object
      properties:
        data:
          $ref: '#/components/schemas/CreateStakeDetails'
      required:
        - data
      title: CreateUnstakeResponse
    CreateCollectResponse:
      type: object
      properties:
        data:
          $ref: '#/components/schemas/CreateStakeDetails'
      required:
        - data
      title: CreateCollectResponse
    CreateStakeDetails:
      type: object
      properties:
        transactionId:
          description: The transaction Id which can be used to reference this operation in other queries
          type: string
      example:
        transactionId: 8696144cca28a634c05858d00e51191408498a7808a837fc4645b4b6997dde09
      required:
        - transactionId
      title: CreateStakeDetails
    CreateCollectRequest:
      type: object
      properties:
        amount:
          description: 'An amount of a crypto-asset to unstake, without units. The unit is derived from the asset type.'
          type: string
          example: '32'
        assetType:
          description: |
            A string representing a type of crypto-asset, which usually corresponds to the crypto asset's ticker symbol.

            Use `/asset-types` to list all of the supported asset types for your organization.
          type: string
          example: ETH
        description:
          description: An optional string providing more context to this transaction. It will be visible on the Anchorage Digital iOS app and will not be published to the blockchain.
          type: string
          example: 'Internal ID: #12838927347'
          nullable: true
        idempotentId:
          description: A client-provided unique ID for idempotent requests
          type: string
          example: '12838927347'
          maxLength: 128
        isFullAmount:
          description: 'Specifies whether to collect the full amount, which overrides any provided amount if set to true.'
          type: boolean
          default: false
        source:
          $ref: '#/components/schemas/SimpleSourceResourceDetails'
        stakingPositionId:
          description: Unique identifier of the staking position
          type: string
          example: 9bc4c2ccba8192b64d41b46d1770abe9ddbb430b85de3fe73e1b4f21336bc48a
      required:
        - assetType
        - stakingPositionId
        - source
      title: CreateCollectRequest
    CreateConsolidateStakeRequest:
      type: object
      properties:
        assetType:
          description: |
            A string representing a type of crypto-asset, which usually corresponds to the crypto asset's ticker symbol.

            Use `/asset-types` to list all of the supported asset types for your organization.
          type: string
          example: ETH
        description:
          description: An optional string providing more context to this transaction. It will be visible on the Anchorage Digital iOS app and will not be published to the blockchain.
          type: string
          example: 'Internal ID: #12838927347'
          nullable: true
        idempotentId:
          description: A client-provided unique ID for idempotent requests
          type: string
          example: '12838927347'
          maxLength: 128
        source:
          $ref: '#/components/schemas/SimpleSourceResourceDetails'
        sourceStakingPosition:
          description: Source staking validator public key to consolidate
          type: string
          example: 0xa1d1...
        targetStakingPosition:
          description: Target staking validator public key
          type: string
          example: 0x9647...
      required:
        - assetType
        - idempotentId
        - source
        - sourceStakingPosition
        - targetStakingPosition
      title: CreateConsolidateStakeRequest
    DelegationWalletAddressesDetails:
      properties:
        address:
          description: The address to delegate to.
          type: string
        anchorageValidator:
          description: Whether this address belongs to an Anchorage Digital Validator.
          type: boolean
        name:
          description: The name of the delegation address.
          type: string
        validatorType:
          description: The type of validator for this delegation address.
          type: string
      required:
        - name
        - address
        - anchorageValidator
        - validatorType
      title: DelegationWalletAddressesDetails
    DelegationAddressesResponse:
      type: object
      properties:
        data:
          type: array
          items:
            $ref: '#/components/schemas/DelegationWalletAddressesDetails'
        page:
          $ref: '#/components/schemas/Page'
      required:
        - data
        - page
      title: DelegationAddressesResponse
    SOLStakingParameters:
      description: 'UNDER DEVELOPMENT: Solana specific staking parameters'
      type: object
      properties:
        stakingProvider:
          description: The validator's provider
          type: string
          enum:
            - FIGMENT
            - BLOCKDAEMON
        stakingProviderAddress:
          description: The validator's vote account address
          type: string
      additionalProperties: false
      oneOf:
        - required:
            - stakingProviderAddress
        - required:
            - stakingProvider
      title: SOLStakingParameters
    ETHStakingParameters:
      description: 'UNDER DEVELOPMENT: ETH specific staking parameters'
      type: object
      properties:
        stakingPositionId:
          description: The staking position identifier. Only required for deposits.
          type: string
        stakingProvider:
          description: The validator's provider. Only required for provisioning.
          type: string
          enum:
            - FIGMENT
            - BLOCKDAEMON
        validatorType:
          description: 'Defines which validator to use: 0x01 Pre-Pectra validators; 0x02 Post-Pectra validators'
          type: string
          enum:
            - '0x01'
            - '0x02'
      additionalProperties: false
      required:
        - validatorType
      title: ETHStakingParameters
    StakingParameters:
      description: Sets specific assets configuration parameters to perform staking
      type: object
      nullable: true
      oneOf:
        - $ref: '#/components/schemas/SOLStakingParameters'
        - $ref: '#/components/schemas/ETHStakingParameters'
    WalletsResponse:
      type: object
      properties:
        data:
          type: array
          items:
            $ref: '#/components/schemas/WalletDetails'
        page:
          $ref: '#/components/schemas/Page'
      required:
        - data
        - page
      title: WalletsResponse
    WalletsAddressesResponse:
      type: object
      properties:
        data:
          $ref: '#/components/schemas/Data'
      required:
        - data
      title: WalletsAddressesResponse
    VaultsWalletResponse:
      type: object
      properties:
        data:
          $ref: '#/components/schemas/WalletDetails'
      required:
        - data
      title: VaultsWalletResponse
    WebhookEventType:
      type: object
      properties:
        description:
          type: string
        id:
          type: string
      example:
        id: transfer.completed
        description: Notification of a successful transfer that is now completed
      required:
        - id
        - description
    WebhookEndpointResponse:
      type: object
      properties:
        createdAt:
          type: string
          format: date-time
        description:
          type: string
        id:
          type: string
          format: uuid
        publicKey:
          type: string
        updatedAt:
          type: string
          format: date-time
        url:
          type: string
          format: uri
      example:
        id: accf45c9-f08e-4b5f-a3b0-162b94baf5a0
        description: Endpoint to receive transaction notifications.
        createdAt: '2024-08-08T13:44:00.234524Z'
        updatedAt: '2024-08-08T13:44:00.234526Z'
        publicKey: |-
          -----BEGIN PUBLIC KEY-----
          MFYwEAYHKoZIzj0CAQYFK4EEAAoDQgAEeg+pxTCsjew/+7IK4+Vw5zyHDnMW7bzn
          sClhuYIKjXF8EJ1lfyZC2VPVullBKgvHRzNMfC1KkF2LIoRp2ibcWQ==
          -----END PUBLIC KEY-----
        url: 'https://your-domain.com/transaction-webhooks'
      required:
        - id
        - createdAt
        - url
      title: WebhookEndpoint
    NewWebhookEndpoint:
      type: object
      properties:
        description:
          type: string
        publicKey:
          type: string
        subscriptions:
          type: array
          items:
            $ref: '#/components/schemas/NewWebhookEndpointSubscription'
        url:
          description: 'url of the endpoint, requires http:// prefix'
          type: string
          format: uri
      example:
        url: 'https://your-domain.com/transaction-webhooks'
        description: Endpoint for receiving transaction event webhooks
        subscriptions:
          - eventTypeId: withdrawal.initiated
        publicKey: |-
          ----BEGIN PUBLIC KEY-----
          MFYwEAYHKoZIzj0CAQYFK4EEAAoDQgAEeg+pxTCsjew/+7IK4+Vw5zyHDnMW7bzn
          sClhuYIKjXF8EJ1lfyZC2VPVullBKgvHRzNMfC1KkF2LIoRp2ibcWQ==
          -----END PUBLIC KEY-----
      additionalProperties: false
      required:
        - url
      title: NewWebhookEndpoint
    WebhookEndpointPatch:
      type: object
      properties:
        description:
          type: string
        publicKey:
          type: string
        subscriptions:
          type: array
          items:
            $ref: '#/components/schemas/NewWebhookEndpointSubscription'
        url:
          type: string
          format: uri
      additionalProperties: false
      title: WebhookEndpointPatch
    CreateWebhookEndpointsResponse:
      type: object
      properties:
        data:
          type: array
          items:
            type: string
            format: uuid
      required:
        - data
      title: CreateWebhookEndpointsResponse
    WebhookEndpointSubscription:
      type: object
      properties:
        createdAt:
          type: string
          format: date-time
        eventTypeId:
          type: string
      required:
        - createdAt
        - eventTypeId
    NewWebhookEndpointSubscription:
      type: object
      properties:
        eventTypeId:
          type: string
      additionalProperties: false
      required:
        - eventTypeId
    CreateWebhookSubscriptionsResponse:
      type: object
      properties: {}
      title: CreateWebhookSubscriptionsResponse
    WithdrawalBankInfo:
      description: Information needed to trigger the wire transfer
      type: object
      properties:
        beneficiary:
          description: Beneficiary Information
          type: object
          properties:
            accountNumber:
              description: Bank Account Number
              type: string
            address:
              $ref: '#/components/schemas/DestinationAddress'
            name:
              description: Name of the Beneficiary
              type: string
          required:
            - address
            - name
        financialInstitution:
          $ref: '#/components/schemas/RoutingDetails'
        intermediateFinancialInstitution:
          $ref: '#/components/schemas/RoutingDetails'
        memo:
          description: Memo field of the wire
          type: string
      required:
        - beneficiary
      title: WithdrawalBankInfo
    CreateSubaccountWithdrawalRequest:
      description: Details of the withdrawal to create for the subaccount
      type: object
      properties:
        asset:
          $ref: '#/components/schemas/AssetAmount'
        customerDetails:
          $ref: '#/components/schemas/WithdrawalBankInfo'
      example:
        asset:
          assetType: USD
          amount: '10.01'
        customerDetails:
          beneficiary:
            name: John Doe
            accountNumber: '123'
            address:
              address: 123 Main Street
              city: Windsor
              state: Iowa
              zipcode: '12312'
          financialInstitution:
            address:
              address: '123'
              address2: '123'
              city: '123'
              zipcode: '123'
              state: '123'
            name: name
            id: '123'
            code: ABA
          memo: '12312312'
      required:
        - asset
        - customerDetails
      title: CreateSubaccountWithdrawalRequest
    AssetAmount:
      type: object
      properties:
        amount:
          description: 'An amount of a crypto-asset to transfer, without units. The unit is derived from the asset type. The amount must be positive'
          type: string
          example: '1000.0'
        assetType:
          description: |-
            A string representing a type of asset, which usually corresponds to the crypto asset's ticker symbol.

            Use `/asset-types` to list all of the supported asset types for your organization.

            For now only USD is available
          type: string
          example: USD
      required:
        - assetType
        - amount
      title: AssetAmount
    CreateSubaccountBillingChargesRequest:
      description: Details of the billing charge to create
      type: object
      properties:
        charges:
          type: array
          items:
            type: object
            properties:
              amount:
                description: The amount to transfer
                type: string
                example: '1000.00'
              subaccountId:
                description: Unique Identifier for the subaccount
                type: string
                example: ec761b5e-fd2c-497a-a9a0-f8738ac97bdf
            required:
              - subaccountId
              - amount
          maxItems: 100
          minItems: 1
        feeType:
          $ref: '#/components/schemas/CreateFeeType'
        idempotentId:
          type: string
        interval:
          type: object
          properties:
            endDate:
              type: string
              format: date
            startDate:
              type: string
              format: date
          required:
            - startDate
            - endDate
      required:
        - idempotentId
        - feeType
        - charges
      title: CreateSubaccountBillingChargesRequest
    CreateSubaccountBillingChargesResponse:
      type: object
      properties:
        data:
          type: object
          properties:
            ids:
              type: array
              items:
                type: string
          required:
            - ids
      required:
        - data
      title: CreateSubaccountBillingChargeResponse
    CancelSubaccountBillingChargeResponse:
      type: object
      properties:
        data:
          type: object
          properties:
            success:
              type: boolean
          required:
            - success
      required:
        - data
      title: CancelSubaccountBillingChargeResponse
    CancelSubaccountWithdrawalResponse:
      type: object
      properties:
        data:
          $ref: '#/components/schemas/CancelSubaccountWithdrawalObject'
      required:
        - data
      title: CancelSubaccountWithdrawalResponse
    CancelSubaccountWithdrawalObject:
      type: object
      properties:
        success:
          type: boolean
      title: CancelSubaccountWithdrawalObject
    GetSubaccountWithdrawalResponse:
      type: object
      properties:
        data:
          $ref: '#/components/schemas/GetSubaccountWithdrawalObject'
      required:
        - data
      title: GetSubaccountWithdrawalResponse
    ListSubaccountWithdrawalsResponse:
      type: object
      properties:
        data:
          type: array
          items:
            $ref: '#/components/schemas/ListSubaccountWithdrawalsObject'
        page:
          $ref: '#/components/schemas/Page'
      required:
        - data
      title: ListSubaccountWithdrawalsResponse
    ListSubaccountWithdrawalsObject:
      type: object
      properties:
        asset:
          $ref: '#/components/schemas/AssetAmount'
        createdAt:
          description: The timestamp when the withdrawal request was created.
          type: string
          format: date-time
          example: '2019-01-02T12:34:56.000Z'
        customerDetails:
          $ref: '#/components/schemas/WithdrawalBankInfo'
        endedAt:
          description: The timestamp when the withdrawal request reached a final state - COMPLETED or FAILED (optional).
          type: string
          format: date-time
          example: '2019-01-03T12:34:56.000Z'
          nullable: true
        transactionId:
          description: Unique Identifier for the transaction
          type: string
          example: c4c4652f-0c07-472c-a7f8-955fbe07775d
        updatedAt:
          description: The timestamp of the last update to the request.
          type: string
          format: date-time
          example: '2019-01-03T12:34:56.000Z'
        withdrawalStatus:
          description: Identifies the status of the withdrawal transaction
          type: string
          enum:
            - INITIATED
            - PENDING_ENDORSEMENT
            - PENDING_REVIEW
            - BROADCASTING
            - COMPLETED
            - FAILED
            - CANCELED
      title: ListSubaccountWithdrawalsObject
    GetSubaccountWithdrawalObject:
      type: object
      properties:
        asset:
          $ref: '#/components/schemas/AssetAmount'
        customerDetails:
          $ref: '#/components/schemas/WithdrawalBankInfo'
        status:
          type: string
          enum:
            - INITIATED
            - PENDING_ENDORSEMENT
            - PENDING_REVIEW
            - BROADCASTING
            - COMPLETED
            - FAILED
            - CANCELED
      title: GetSubaccountWithdrawalObject
    CreateSubaccountWithdrawalResponse:
      type: object
      properties:
        data:
          $ref: '#/components/schemas/SubaccountWithdrawalResponse'
      required:
        - data
      title: CreateSubaccountWithdrawalResponse
    SubaccountWithdrawalResponse:
      type: object
      properties:
        transactionId:
          description: Unique Identifier for the transaction
          type: string
          example: c4c4652f-0c07-472c-a7f8-955fbe07775d
      required:
        - transactionId
      title: SubaccountWithdrawalResponse
    CreateFundingAllocation:
      type: object
      properties:
        amount:
          description: The amount to allocate
          type: string
          example: '1000.00'
        assetType:
          description: 'A string representing a type of asset. At the moment, only USD is supported.'
          type: string
          example: USD
        subaccountId:
          description: Unique Identifier for the subaccount
          type: string
          example: ec761b5e-fd2c-497a-a9a0-f8738ac97bdf
        transactionType:
          description: |
            A string describing the type of the given allocation

            * DEPOSIT - Deposit allocation (Client to Program Customer)

            * WITHDRAWAL - Withdrawal allocation (Program Customer to Client)
          type: string
          enum:
            - DEPOSIT
            - WITHDRAWAL
      required:
        - subaccountId
        - assetType
        - amount
        - transactionType
      title: CreateFundingAllocation
    CreateFundingAllocationsRequest:
      description: Details of the allocations to create
      type: object
      properties:
        allocations:
          type: array
          items:
            $ref: '#/components/schemas/CreateFundingAllocation'
          maxItems: 100
          minItems: 1
        idempotentId:
          description: A client-provided unique ID for idempotent requests
          type: string
          example: '12838927347'
          maxLength: 128
      required:
        - allocations
        - idempotentId
      title: CreateFundingAllocationsRequest
    CreateFundingAllocationsResponse:
      type: object
      properties:
        idempotentId:
          description: A client-provided unique ID for idempotent requests
          type: string
          example: '12838927347'
          maxLength: 128
        transactionIds:
          type: array
          items:
            type: string
      required:
        - idempotentId
      title: CreateFundingAllocationsResponse
    WithdrawalDetails:
      type: object
      properties:
        withdrawalId:
          description: The withdrawal ID which can be used to reference this operation in other queries
          type: string
      example:
        withdrawalId: 8696144cca28a634c05858d00e51191408498a7808a837fc4645b4b6997dde09
      required:
        - withdrawalId
      title: WithdrawalDetails
    WithdrawalRequest:
      type: object
      properties:
        amount:
          description: 'An amount of a crypto-asset to transfer, without units. The unit is derived from the asset type.'
          type: string
          example: '1000.00000000'
        assetParametersATOM:
          $ref: '#/components/schemas/WithdrawalParametersForATOM'
        assetParametersCosmos:
          $ref: '#/components/schemas/WithdrawalParametersForCosmos'
        assetParametersExtra:
          $ref: '#/components/schemas/WithdrawalParametersExtra'
        assetParametersFiatTrustedDestination:
          $ref: '#/components/schemas/WithdrawalParametersForFiatTrustedDestination'
        assetParametersXLM:
          $ref: '#/components/schemas/WithdrawalParametersForXLM'
        assetParametersXRP:
          $ref: '#/components/schemas/WithdrawalParametersForXRP'
        assetType:
          description: |
            A string representing a type of crypto-asset, which usually corresponds to the crypto asset's ticker symbol.

            Use `/asset-types` to list all of the supported asset types for your organization.
          type: string
          example: BTC
        description:
          description: An optional string providing more context to this transaction. It will be visible on the Anchorage Digital iOS app and will not be published to the blockchain.
          type: string
          example: 'Internal ID: #12838927347'
          nullable: true
        destination:
          $ref: '#/components/schemas/ResourceDetails'
        idempotentId:
          description: A client-provided unique ID for idempotent requests (optional)
          type: string
          example: '12838927347'
          maxLength: 128
          nullable: true
        source:
          $ref: '#/components/schemas/SourceResourceDetailsRequest'
        useGasStation:
          description: 'If true, the Anchorage Digital gas station will pay gas fees, for supported asset types and organizations.'
          type: boolean
          nullable: true
        withdrawalAmlQuestionnaire:
          $ref: '#/components/schemas/AMLQuestionnaire'
      required:
        - assetType
        - amount
      title: WithdrawalRequest
    AMLQuestionnaire:
      description: Anti-money laundering questionnaire submission
      type: object
      properties:
        destinationType:
          description: Where the address that will receive the withdrawal is held. Use of UNHOSTED_WALLET is deprecated and shouldn't be used. Instead use SELFHOSTED_WALLET.
          type: string
          example: FINANCIAL_INSTITUTION
          enum:
            - FINANCIAL_INSTITUTION
            - UNHOSTED_WALLET
            - SELFHOSTED_WALLET
        institutionCountry:
          description: 'The country of the institution on the receiving end of the withdrawal, must be specified when the `destinationType` is `FINANCIAL_INSTITUTION` (ISO 3166-1 alpha-2 code).'
          type: string
          example: US
        institutionName:
          description: 'The name of the institution on the receiving end of the withdrawal, must be specified when the `destinationType` is `FINANCIAL_INSTITUTION`.'
          type: string
          example: Coinbase
        originatorCity:
          description: 'The city of the person or entity that is withdrawing the funds, must be specified when the `originatorType` is `MY_CLIENT`.'
          type: string
          example: San Francisco
        originatorCountry:
          description: 'The country of the client that is withdrawing the funds, must be specified when the `originatorType` is `MY_CLIENT` (ISO 3166-1 alpha-2 code).'
          type: string
          example: US
        originatorName:
          description: 'The name of the client that is withdrawing the funds, must be specified when the `originatorType` is `MY_CLIENT`.'
          type: string
          example: Satoshi Nakamoto
        originatorPostalCode:
          description: 'The zip code/postal code of the person or entity that is withdrawing the funds, can be specified when the `originatorType` is `MY_CLIENT`.'
          type: string
          example: 65584-5678
        originatorStateProvince:
          description: 'The state/province of the person or entity that is withdrawing the funds, can be specified when the `originatorType` is `MY_CLIENT` (full name format).'
          type: string
          example: Wyoming
        originatorStreetAddress:
          description: 'The street address of the person or entity that is withdrawing the funds, must be specified when the `originatorType` is `MY_CLIENT`.'
          type: string
          example: '1234 NW Bobcat Lane, St. Robert, MO'
        originatorType:
          description: 'Who is the originator of this withdrawal, must be specified when originator is a Financial Institution.'
          type: string
          example: MY_ORGANIZATION
          enum:
            - MY_ORGANIZATION
            - MY_CLIENT
        purpose:
          description: The purpose of the withdrawal.
          type: string
          example: TRADING_SETTLEMENT
          enum:
            - TRADING_SETTLEMENT
            - LENDING
            - INVESTMENT
            - EXPENSES
            - FEE_PAYMENT
            - GRANT_PAYMENT
            - PRIZE_AWARD
            - GIFT
            - REIMBURSEMENT
            - REBALANCE
            - INTRA_COMPANY
            - REWARDS_DISTRIBUTION
        recipientCity:
          description: 'The city of the person or entity that will receive the funds being withdrawn, can be specified when the `recipientType` is `PERSON` or `ENTITY` (optional, except if Street Address is indicated).'
          type: string
          example: San Francisco
        recipientCountry:
          description: 'The country of the entity or person that will receive the funds being withdrawn, must be specified when the `recipientType` is `PERSON` or `ENTITY` (ISO 3166-1 alpha-2 code).'
          type: string
          example: JP
        recipientFirstName:
          description: 'The first name of the person that will receive the funds being withdrawn, must be specified when the `recipientType` is `PERSON`.'
          type: string
          example: Satoshi
        recipientFullName:
          description: 'The full name of the entity that will receive the funds being withdrawn, must be specified when the `recipientType` is `ENTITY`.'
          type: string
          example: Satoshi Nakamoto
        recipientLastName:
          description: 'The last name of the person that will receive the funds being withdrawn, must be specified when the `recipientType` is `PERSON`.'
          type: string
          example: Nakamoto
        recipientPostalCode:
          description: 'The zip code/postal code of the person or entity that will receive the funds being withdrawn, can be specified when the `recipientType` is `PERSON` or `ENTITY` (optional).'
          type: string
          example: 65584-5678
        recipientStateProvince:
          description: 'The state/province of the person or entity that will receive the funds being withdrawn, can be specified when the `recipientType` is `PERSON` or `ENTITY` (full name format) (optional).'
          type: string
          example: Wyoming
        recipientStreetAddress:
          description: 'The street address of the person or entity that will receive the funds being withdrawn, can be specified when the `recipientType` is `PERSON` or `ENTITY` (optional, except if City is indicated).'
          type: string
          example: '1234 NW Bobcat Lane, St. Robert, MO'
        recipientType:
          description: |
            The entity or person that will receive the funds being withdrawn.

             * `DESTINATION_INSTITUTION` - Financial institution specified above in `institutionName`
             * `MY_ORGANIZATION` - Same organization initiating the withdrawal, the Anchorage Digital account owner
             * `PERSON` - Other person
             * `ENTITY` - Other entity
          type: string
          example: PERSON
          enum:
            - DESTINATION_INSTITUTION
            - MY_ORGANIZATION
            - PERSON
            - ENTITY
        selfhostedDescription:
          description: 'A description of the self-hosted wallet, must be specified when the `destinationType` is `SELFHOSTED_WALLET`.'
          type: string
          example: An explanation about where this address is held
        useTrustedDestinationAml:
          description: |-
            When the withdrawal destination address is a Trusted Destination, the system can automatically fetch the Beneficiary and Destination information using the AML data provided for that Trusted Destination.

            This parameter needs to be used to specify if the Trusted Destination information should be used, when available:

            * `true` - no need to provide Beneficiary and Destination AML information, as the system will automatically use the information from the Trusted Destination

            * `false` - must provide the Beneficiary and Destination AML information in the API request
          type: boolean
          nullable: true
      required:
        - purpose
      title: AMLQuestionnaire
    WithdrawalParametersForXRP:
      description: 'Additional parameters to be provided exclusively when `assetType` is "XRP". When using a Trusted Destination, these parameters must not be provided — the destination tag is inherited from the trusted destination. Set `destination.type` to `TRUSTED_DESTINATION` and `destination.id` to the trusted destination ID instead.'
      type: object
      properties:
        destinationTag:
          description: 'A number often used to uniquely identify the recipient of the transaction, commonly used when transferring funds to custodial wallets, exchanges or other situations where the `destinationAddress` is multi-purpose. Must be included whenever provided by the recipient of the transaction.'
          type: integer
          format: uint32
          example: 23874
      required:
        - destinationTag
      title: WithdrawalParametersForXRP
    WithdrawalParametersForXLM:
      description: 'Additional parameters to be provided exclusively when `assetType` is "XLM". When using a Trusted Destination, these parameters must not be provided — the memo is inherited from the trusted destination. Set `destination.type` to `TRUSTED_DESTINATION` and `destination.id` to the trusted destination ID instead.'
      type: object
      properties:
        memo:
          description: 'An alphanumeric string often used to uniquely identify the recipient of the transaction, commonly used when transferring funds to custodial wallets, exchanges or other situations where the `destinationAddress` is multi-purpose. Must be included whenever provided by the recipient of the transaction.'
          type: string
          example: w3mp19cqp2
          maxLength: 28
      required:
        - memo
      title: WithdrawalParametersForXLM
    WithdrawalParametersForCosmos:
      description: 'Additional parameters to be provided exclusively when `assetType` is for a Cosmos blockchain. When using a Trusted Destination, these parameters must not be provided — the memo is inherited from the trusted destination. Set `destination.type` to `TRUSTED_DESTINATION` and `destination.id` to the trusted destination ID instead.'
      type: object
      properties:
        memo:
          description: 'An alphanumeric string often used to uniquely identify the recipient of the transaction, commonly used when transferring funds to custodial wallets, exchanges or other situations where the `destinationAddress` is multi-purpose. Must be included whenever provided by the recipient of the transaction.'
          type: string
          example: w3mp19cqp2
          maxLength: 256
      required:
        - memo
      title: WithdrawalParametersForCosmos
    WithdrawalParametersForATOM:
      description: 'Additional parameters to be provided exclusively when `assetType` is "ATOM". This field is deprecated, please migrate to using `assetParametersCosmos` instead. When using a Trusted Destination, these parameters must not be provided — the memo is inherited from the trusted destination. Set `destination.type` to `TRUSTED_DESTINATION` and `destination.id` to the trusted destination ID instead.'
      type: object
      properties:
        memo:
          description: 'An alphanumeric string often used to uniquely identify the recipient of the transaction, commonly used when transferring funds to custodial wallets, exchanges or other situations where the `destinationAddress` is multi-purpose. Must be included whenever provided by the recipient of the transaction.'
          type: string
          example: w3mp19cqp2
          maxLength: 256
      required:
        - memo
      title: WithdrawalParametersForATOM
    WithdrawalParametersExtra:
      description: 'Extra parameters, to be provided for assets. When using a Trusted Destination, these parameters must not be provided — the memo is inherited from the trusted destination. Set `destination.type` to `TRUSTED_DESTINATION` and `destination.id` to the trusted destination ID instead.'
      type: object
      properties:
        value:
          description: 'An alphanumeric string often used to uniquely identify the recipient of the transaction, commonly used when transferring funds to custodial wallets, exchanges or other situations where the `destinationAddress` is multi-purpose. Must be included whenever provided by the recipient of the transaction.'
          type: string
          example: w3mp19cqp2
          maxLength: 256
      required:
        - value
      title: WithdrawalParametersExtra
    WithdrawalParametersForFiatTrustedDestination:
      description: Additional parameters to be provided exclusively when the destination is a Trusted Destination and `assetType` is fiat.
      type: object
      properties:
        memo:
          description: 'Note to Beneficiary. If not provided, the memo on the Trusted Destination will be used by default.'
          type: string
          example: Invoice 123
          maxLength: 140
        purpose:
          description: |-
            The purpose of the funds being withdrawn.

             * `TRADING_SETTLEMENT` - Trading Settlement
             * `LENDING` - Lending
             * `INVESTMENT` - Investment
             * `EXPENSES` - Expenses
             * `FEE_PAYMENT` - Fee Payment
             * `GRANT_PAYMENT` - Grant Payment
             * `PRIZE_AWARD` - Prize Award
             * `GIFT` - Gift
             * `REIMBURSEMENT` - Reimbursement
             * `REBALANCE` - Rebalance
             * `INTRA_COMPANY` - Intra Company
          type: string
          example: TRADING_SETTLEMENT
          enum:
            - TRADING_SETTLEMENT
            - LENDING
            - INVESTMENT
            - EXPENSES
            - FEE_PAYMENT
            - GRANT_PAYMENT
            - PRIZE_AWARD
            - GIFT
            - REIMBURSEMENT
            - REBALANCE
            - INTRA_COMPANY
      required:
        - purpose
      title: WithdrawalParametersForFiatTrustedDestination
    WithdrawalResponse:
      type: object
      properties:
        data:
          $ref: '#/components/schemas/WithdrawalDetails'
      required:
        - data
      title: WithdrawalResponse
    TransfersResponse:
      type: object
      properties:
        data:
          type: array
          items:
            $ref: '#/components/schemas/TransferDetails'
        page:
          $ref: '#/components/schemas/Page'
      required:
        - data
        - page
      title: TransfersResponse
    TransfersResponse1:
      type: object
      properties:
        data:
          $ref: '#/components/schemas/Data3'
      required:
        - data
      title: TransfersResponse1
    TransfersResponse2:
      type: object
      properties:
        data:
          $ref: '#/components/schemas/TransferDetails'
      required:
        - data
      title: TransfersResponse2
    VaultsAddressesResponse:
      type: object
      properties:
        data:
          type: array
          items:
            $ref: '#/components/schemas/SignedAddress'
        page:
          $ref: '#/components/schemas/Page'
      required:
        - data
        - page
      title: VaultsAddressesResponse
    ResourceType:
      description: The type of the resource being referenced. Note that the VAULT type has been deprecated and WALLET should be used instead.
      type: string
      enum:
        - VAULT
        - WALLET
        - ADDRESS
        - STANDING_INSTRUCTION
        - TRUSTED_DESTINATION
      title: ResourceType
    ResourceDetails:
      description: |
        An object representing a resource capable of receiving, or holding funds.



        Construction example:

          ```
          {
            "id":"1c920f4241b78a1d483a29f3c24b6c4c",
            "type":"WALLET"
          }
          ```
      type: object
      properties:
        id:
          description: The identifier of the resource
          type: string
          example: 1c920f4241b78a1d483a29f3c24b6c4c
        type:
          $ref: '#/components/schemas/ResourceType'
      required:
        - id
        - type
      title: Resource
    SourceResourceType:
      description: The type of the resource being referenced. Note that the VAULT type has been deprecated and WALLET should be used instead.
      type: string
      enum:
        - VAULT
        - WALLET
      title: SourceResourceType
    SourceResourceTypeRequest:
      description: The type of the resource being referenced. Note that the VAULT type has been deprecated and WALLET should be used instead.
      type: string
      enum:
        - VAULT
        - WALLET
        - SUBACCOUNT
      title: SourceResourceType
    SourceResourceDetails:
      description: |
        An object representing a resource capable of sending funds.


        Construction example:
          ```
          {
            "id":"1c920f4241b78a1d483a29f3c24b6c4c",
            "type":"WALLET"
          }
          ```
      type: object
      properties:
        id:
          description: The identifier of the resource
          type: string
          example: 1c920f4241b78a1d483a29f3c24b6c4c
        type:
          $ref: '#/components/schemas/SourceResourceType'
      required:
        - id
        - type
      title: SourceResource
    SourceResourceDetailsRequest:
      description: |
        An object representing a resource capable of sending funds.


        Construction example:
          ```
          {
            "id":"1c920f4241b78a1d483a29f3c24b6c4c",
            "type":"WALLET"
          }
          ```
      type: object
      properties:
        customerId:
          description: 'Identifier of a Subaccout Customer. Required property if subaccount type is JOINT, optional otherwise'
          type: string
        id:
          description: The identifier of the resource
          type: string
          example: 1c920f4241b78a1d483a29f3c24b6c4c
        type:
          $ref: '#/components/schemas/SourceResourceTypeRequest'
      required:
        - id
        - type
      title: SourceResource
    TransfersRequest:
      type: object
      properties:
        amount:
          description: 'An amount of a crypto-asset to transfer, without units. The unit is derived from the asset type.'
          type: string
          example: '1000.00000000'
        assetParametersATOM:
          $ref: '#/components/schemas/WithdrawalParametersForATOM'
        assetParametersCosmos:
          $ref: '#/components/schemas/WithdrawalParametersForCosmos'
        assetParametersExtra:
          $ref: '#/components/schemas/WithdrawalParametersExtra'
        assetParametersFiatTrustedDestination:
          $ref: '#/components/schemas/WithdrawalParametersForFiatTrustedDestination'
        assetParametersXLM:
          $ref: '#/components/schemas/WithdrawalParametersForXLM'
        assetParametersXRP:
          $ref: '#/components/schemas/WithdrawalParametersForXRP'
        assetType:
          description: |
            A string representing a type of crypto-asset, which usually corresponds to the crypto asset's ticker symbol.

            Use `/asset-types` to list all of the supported asset types for your organization.
          type: string
          example: BTC
        deductFeeFromAmountIfSameType:
          description: |
            If false, any network fees will always be added to amount requested. For example, a request to transfer 5 BTC with `deductFeeFromAmountIfSameType=false` would result in 5 exactly BTC received to the destination wallet and just over 5 BTC spent by the source wallet.


            If `true` and the amount transferred is the same asset type as the network fee for the transfer, the network fee is deducted from the amount instead. For example, a request to transfer 5 BTC with `deductFeeFromAmountIfSameType=true` would result in just under 5 BTC received to the destination wallet.


            For assets where the exact fee taken by the network is not known until the transaction is mined, it is likely that the amount spent will fall just short of the amount requested. For example, a request to transfer 5 ETH with `deductFeeFromAmountIfSameType=true` may result in the sending wallet spending 4.97 ETH and the recipient receiving 4.9 ETH. In this example, Anchorage Digital specifies to the network a maximum allowable fee of 0.1 ETH, but the network takes only 0.07 ETH


            For UTXO-based assets, if `deductFeeFromAmountIfSameType=true` and the amount requested for transfer is just short of the total balance of the asset, the network will refuse to accept this transaction because the remainder would be unspendable. This is an unlikely edge case. See "Bitcoin Dust" for more context.


            This flag is ignored for transfers where the amount and the fee asset types are separate.
          type: boolean
          default: false
        destination:
          $ref: '#/components/schemas/ResourceDetails'
        idempotentId:
          description: A client-provided unique ID for idempotent requests (mandatory)
          type: string
          example: '12838927347'
          maxLength: 128
        source:
          $ref: '#/components/schemas/SourceResourceDetails'
        transferAmlQuestionnaire:
          $ref: '#/components/schemas/TransferAMLQuestionnaire'
        transferMemo:
          description: A user-supplied description that will become the description of the subsequent transfer transaction (optional)
          type: string
          example: 'Internal ID: #12838927347'
          nullable: true
        useGasStation:
          description: 'If true, the Anchorage Digital gas station will pay gas fees, for supported asset types and organizations.'
          type: boolean
          nullable: true
      required:
        - assetType
        - amount
      title: TransfersRequest
    TransferAMLQuestionnaire:
      description: Anti-money laundering questionnaire submission
      type: object
      properties:
        destinationType:
          description: __DEPRECATED__ - Where the address that will receive the withdrawal is held.
          type: string
          enum:
            - FINANCIAL_INSTITUTION
            - SELFHOSTED_WALLET
        institutionCountry:
          description: '__DEPRECATED__ - The country of the institution on the receiving end of the withdrawal, must be specified when the `destinationType` is `FINANCIAL_INSTITUTION` (ISO 3166-1 alpha-2 code).'
          type: string
        institutionName:
          description: '__DEPRECATED__ - The name of the institution on the receiving end of the withdrawal, must be specified when the `destinationType` is `FINANCIAL_INSTITUTION`.'
          type: string
        originatorCity:
          description: 'The city of the person or entity that is withdrawing the funds, must be specified when the `originatorType` is `MY_CLIENT`.'
          type: string
          example: San Francisco
        originatorCountry:
          description: 'The country of the client that is withdrawing the funds, must be specified when the `originatorType` is `MY_CLIENT` (ISO 3166-1 alpha-2 code).'
          type: string
          example: US
        originatorName:
          description: 'The name of the client that is withdrawing the funds, must be specified when the `originatorType` is `MY_CLIENT`.'
          type: string
          example: Satoshi Nakamoto
        originatorPostalCode:
          description: 'The zip code/postal code of the person or entity that is withdrawing the funds, can be specified when the `originatorType` is `MY_CLIENT`.'
          type: string
          example: 65584-5678
        originatorStateProvince:
          description: 'The state/province of the person or entity that is withdrawing the funds, can be specified when the `originatorType` is `MY_CLIENT` (full name format).'
          type: string
          example: Wyoming
        originatorStreetAddress:
          description: 'The street address of the person or entity that is withdrawing the funds, must be specified when the `originatorType` is `MY_CLIENT`.'
          type: string
          example: '1234 NW Bobcat Lane, St. Robert, MO'
        originatorType:
          description: 'Who is the originator of this withdrawal, must be specified when originator is a Financial Institution.'
          type: string
          example: MY_ORGANIZATION
          enum:
            - MY_ORGANIZATION
            - MY_CLIENT
        purpose:
          description: The purpose of the withdrawal.
          type: string
          example: TRADING_SETTLEMENT
          enum:
            - TRADING_SETTLEMENT
            - LENDING
            - INVESTMENT
            - EXPENSES
            - FEE_PAYMENT
            - GRANT_PAYMENT
            - PRIZE_AWARD
            - GIFT
            - REIMBURSEMENT
            - REBALANCE
            - INTRA_COMPANY
            - REWARDS_DISTRIBUTION
        recipientCity:
          description: '__DEPRECATED__ - The city of the person or entity that will receive the funds being withdrawn, can be specified when the `recipientType` is `PERSON` or `ENTITY` (optional, except if Street Address is indicated).'
          type: string
        recipientCountry:
          description: '__DEPRECATED__ - The country of the entity or person that will receive the funds being withdrawn, must be specified when the `recipientType` is `PERSON` or `ENTITY` (ISO 3166-1 alpha-2 code).'
          type: string
        recipientFirstName:
          description: '__DEPRECATED__ - The first name of the person that will receive the funds being withdrawn, must be specified when the `recipientType` is `PERSON`.'
          type: string
        recipientFullName:
          description: '__DEPRECATED__ - The full name of the entity that will receive the funds being withdrawn, must be specified when the `recipientType` is `ENTITY`.'
          type: string
        recipientLastName:
          description: '__DEPRECATED__ - The last name of the person that will receive the funds being withdrawn, must be specified when the `recipientType` is `PERSON`.'
          type: string
        recipientPostalCode:
          description: '__DEPRECATED__ - The zip code/postal code of the person or entity that will receive the funds being withdrawn, can be specified when the `recipientType` is `PERSON` or `ENTITY` (optional).'
          type: string
        recipientStateProvince:
          description: '__DEPRECATED__ - The state/province of the person or entity that will receive the funds being withdrawn, can be specified when the `recipientType` is `PERSON` or `ENTITY` (full name format) (optional).'
          type: string
        recipientStreetAddress:
          description: '__DEPRECATED__ - The street address of the person or entity that will receive the funds being withdrawn, can be specified when the `recipientType` is `PERSON` or `ENTITY` (optional, except if City is indicated).'
          type: string
        recipientType:
          description: |
            __DEPRECATED__ - The entity or person that will receive the funds being withdrawn.

            * `DESTINATION_INSTITUTION` - Financial institution specified above in `institutionName`

            * `MY_ORGANIZATION` - Same organization initiating the withdrawal, the Anchorage Digital account owner

            * `PERSON` - Other person

            * `ENTITY` - Other entity
          type: string
          enum:
            - DESTINATION_INSTITUTION
            - MY_ORGANIZATION
            - PERSON
            - ENTITY
        selfhostedDescription:
          description: '__DEPRECATED__ - A description of the self-hosted wallet, must be specified when the `destinationType` is `SELFHOSTED_WALLET`.'
          type: string
      example:
        originatorType: MY_CLIENT
        originatorName: Satoshi Nakamoto
        originatorCountry: US
        originatorStreetAddress: '1234 NW Bobcat Lane, St. Robert, MO'
        originatorPostalCode: 65584-5678
        originatorCity: San Francisco
        originatorStateProvince: Wyoming
        purpose: TRADING_SETTLEMENT
      required:
        - purpose
      title: AMLQuestionnaire
    SignedAddress:
      type: object
      properties:
        address:
          description: A crypto address for the intended asset
          type: string
          example: 2N19AcihQ1a4MxQW658UFHTioUNnMkiHPkw
        addressId:
          description: An id uniquely identifying an Anchorage Digital address.
          type: string
          example: a33f83d96ca95cac000a344aa478a8b8
        addressSignaturePayload:
          description: The hex-encoding of the bytes that were signed.
          type: string
          example: 7b225465787441646472657373223a22324e313941636968513161344d78515736353855464854696f554e6e4d6b6948506b77227d
        certChain:
          description: 'An x509 certificate chain in PEM format. When present, indicates that this address uses a V2 signature scheme where the signature is verified against the public key in the leaf certificate, and the certificate chain must verify up to a trusted Anchorage Digital Root CA. The Root CA is provided out-of-band. When absent, the signature is verified against the Organization Public Key (V1 signature scheme).'
          type: string
          example: |
            -----BEGIN CERTIFICATE-----
            MIIBkTCCATigAwIBAgIQExample...
            -----END CERTIFICATE-----
            -----BEGIN CERTIFICATE-----
            MIIBkTCCATigAwIBAgIQExample...
            -----END CERTIFICATE-----
        signature:
          description: A hex-encoded signature of the addressSignaturePayload
          type: string
          example: 1642000aa9cca8e8610981aefbdb204b361c9dca3fa067b88fdacfba7a0f620d721378a33f4bbadad3923e633a4d712646d1e8e314e9fcb4aa4102c0581f6503
        signatureVersion:
          description: The address signature scheme used for this address
          type: string
          example: V2
          enum:
            - V1
            - V2
        walletId:
          description: An ID uniquely identifying an Anchorage Digital wallet
          type: string
          example: a33f83d96ca95cac000a344aa478a8b8
      required:
        - address
        - addressId
        - addressSignaturePayload
        - signature
      title: SignedAddress
    SignedAddressForWallet:
      description: The deposit address for crypto wallets. Fiat wallets use deposit instructions instead.
      type: object
      properties:
        address:
          description: A crypto address for the intended asset
          type: string
          example: 2N19AcihQ1a4MxQW658UFHTioUNnMkiHPkw
        addressId:
          description: An id uniquely identifying an Anchorage Digital address.
          type: string
          example: a33f83d96ca95cac000a344aa478a8b8
        addressSignaturePayload:
          description: The hex-encoding of the bytes that were signed.
          type: string
          example: 7b225465787441646472657373223a22324e313941636968513161344d78515736353855464854696f554e6e4d6b6948506b77227d
        certChain:
          description: 'An x509 certificate chain in PEM format. When present, indicates that this address uses a V2 signature scheme where the signature is verified against the public key in the leaf certificate, and the certificate chain must verify up to a trusted Anchorage Digital Root CA. The Root CA is provided out-of-band. When absent, the signature is verified against the Organization Public Key (V1 signature scheme).'
          type: string
          example: |
            -----BEGIN CERTIFICATE-----
            MIIBkTCCATigAwIBAgIQExample...
            -----END CERTIFICATE-----
            -----BEGIN CERTIFICATE-----
            MIIBkTCCATigAwIBAgIQExample...
            -----END CERTIFICATE-----
        signature:
          description: A hex-encoded signature of the addressSignaturePayload
          type: string
          example: 1642000aa9cca8e8610981aefbdb204b361c9dca3fa067b88fdacfba7a0f620d721378a33f4bbadad3923e633a4d712646d1e8e314e9fcb4aa4102c0581f6503
        signatureVersion:
          description: The address signature scheme used for this address
          type: string
          example: V2
          enum:
            - V1
            - V2
      required:
        - address
        - addressId
        - addressSignaturePayload
        - signature
      title: SignedAddressForWallet
    DepositInstruction:
      description: The deposit instructions for fiat wallets. Crypto wallets use a deposit address instead.
      type: object
      properties:
        bankAddress:
          description: The address of the bank
          type: string
          example: '123 Main Street, Anytown, USA 12345'
        bankName:
          description: The name of the bank
          type: string
          example: Example Bank
        bankRoutingNumber:
          description: The bank routing number of the beneficiary
          type: string
          example: '123456789'
        bankSwiftCode:
          description: The SWIFT code of the bank
          type: string
          example: '12345678'
        beneficiaryAccountNumber:
          description: The bank account number of the beneficiary
          type: string
          example: '12345678'
        beneficiaryAddress:
          description: The address of the beneficiary
          type: string
          example: '123 Main Street, Anytown, USA 12345'
        beneficiaryName:
          description: The name of the beneficiary
          type: string
          example: John Doe
        memoField:
          description: A memo field for the bank info
          type: string
          example: '123456789'
      required:
        - bankName
        - bankRoutingNumber
        - bankAddress
        - bankSwiftCode
        - beneficiaryName
        - beneficiaryAddress
        - beneficiaryAccountNumber
      title: DepositInstruction
    TransferDetails:
      type: object
      properties:
        amount:
          $ref: '#/components/schemas/Amount'
        assetType:
          description: |
            A string representing a type of crypto-asset, which usually corresponds to the crypto asset's ticker symbol.

            Use `/asset-types` to list all of the supported asset types for your organization.
          type: string
          example: BTC
        blockchainTxId:
          description: 'The blockchain transaction ID, if applicable'
          type: string
        createdAt:
          description: The timestamp when the transfer request was created
          type: string
          format: date-time
          example: '2019-01-02T12:34:56.000Z'
        destination:
          $ref: '#/components/schemas/ResourceDetails'
        endedAt:
          description: The timestamp when the transfer request reached a final state - completion or failure (optional)
          type: string
          format: date-time
          example: '2019-01-03T12:34:56.000Z'
          nullable: true
        error:
          $ref: '#/components/schemas/ErrorDetails'
        fee:
          $ref: '#/components/schemas/Amount'
        source:
          $ref: '#/components/schemas/SourceResourceDetails'
        status:
          $ref: '#/components/schemas/TransferStatus'
        transferId:
          description: The transfer ID which can be used to reference this transfer in other queries
          type: string
        transferMemo:
          description: A user-supplied description that will become the description of the subsequent transfer operation (optional)
          type: string
          nullable: true
      example:
        transferId: 008d3ec72558ce907571886df63ef51594b5bd8cf106a0b7fa8f12a30dfc867f
        amount:
          quantity: '1000.00000000'
          assetType: USDC
          currentPrice: '1.00'
          currentUSDValue: '1000.00'
        fee:
          quantity: '0.0002207155625'
          assetType: ETH
        assetType: USDC
        source:
          id: 1c920f4241b78a1d483a29f3c24b6c4c
          type: WALLET
        destination:
          id: 55e89d4a644d736b01533a2ea9b32a20
          type: WALLET
        transferMemo: 'Internal ID: #12838927347'
        status: COMPLETED
        createdAt: '2019-01-02T12:34:56.000Z'
        endedAt: '2019-01-03T12:34:56.000Z'
      required:
        - transferId
        - status
        - amount
        - assetType
        - createdAt
      title: TransferDetails
    TransactionsResponse:
      type: object
      properties:
        data:
          type: array
          items:
            $ref: '#/components/schemas/TransactionDetails'
        page:
          $ref: '#/components/schemas/Page'
      required:
        - data
        - page
      title: TransactionsResponse
    TransactionResponse:
      type: object
      properties:
        data:
          $ref: '#/components/schemas/TransactionDetails'
      required:
        - data
      title: TransactionResponse
    TransactionDetails:
      type: object
      properties:
        amount:
          $ref: '#/components/schemas/Amount'
        assetType:
          description: |
            A string representing a type of crypto-asset, which usually corresponds to the crypto asset's ticker symbol.

            Use `/asset-types` to list all of the supported asset types for your organization.
          type: string
          example: BTC
        blockchainTxId:
          description: 'The blockchain transaction ID, once available'
          type: string
          example: '0xd7b99c44240ae5bdd7d2f8572358ee2a521c4d93b74c8fd3df6557ac9f02b008'
        dateTime:
          description: The timestamp of when the transaction was created or when it reached its final state (completion or failure)
          type: string
          format: date-time
          example: '2019-01-02T12:34:56.000Z'
          nullable: true
        description:
          description: 'A string providing more context to this transaction. Will commonly return the input provided by the user when the transaction was requested. For transfers, the memo provided in the TransfersRequest will populate the `description` field of both the resultant Transfer in the source vault and the resultant Deposit in the destination vault.'
          type: string
          example: Withdrawing to exchange
        destinationAddresses:
          description: 'The destination blockchain addresses for a transaction. Contains blockchain addresses only, so it is always empty for FIAT asset types; fiat destinations are identified by `destinationWalletId` for internal transfers and `fiatDetails` for external ones.'
          type: array
          items:
            type: string
        destinationWalletId:
          description: 'For transfers between Anchorage Digital wallets, the ID of the destination wallet. Absent for external destinations.'
          type: string
          example: d24b424293c0d64c6194f52801b3d293
        extra:
          description: Blockchain asset-specific details such as a memo in XLM
          type: string
          example: 'Blockchain-specific details, such as memo in XLM'
        fee:
          $ref: '#/components/schemas/Amount'
        fiatDetails:
          $ref: '#/components/schemas/FiatDetails'
        id:
          description: An ID uniquely identifying a transaction within Anchorage Digital
          type: string
          example: 9d570c38a148a6e0b4facf1e0d8c27dd6eba48c41421be1ba8bb778cbeb1a4df
        sourceAddresses:
          description: 'The originating blockchain addresses for a transaction. Contains blockchain addresses only, so it is always empty for FIAT asset types.'
          type: array
          items:
            type: string
        status:
          $ref: '#/components/schemas/TransactionStatus'
        transactionType:
          $ref: '#/components/schemas/TransactionType'
        vaultId:
          description: An ID uniquely identifying an Anchorage Digital vault.
          type: string
          example: 1c920f4241b78a1d483a29f3c24b6c4c
        vaultName:
          description: The name of the vault which the transaction affected
          type: string
          example: Long Hold Vault
        walletId:
          description: An ID uniquely identifying an Anchorage Digital wallet
          type: string
          example: d24b424293c0d64c6194f52801b3d293
      required:
        - id
        - amount
        - status
        - transactionType
        - vaultId
        - vaultName
        - assetType
        - description
      title: TransactionDetails
    FiatDetails:
      description: 'Banking details for the counterparty of a fiat transaction: for deposits, the originating (sender) account; for withdrawals and transfers, the beneficiary (receiver) account the funds were sent to.'
      type: object
      properties:
        accountNumber:
          description: Bank account number
          type: string
          example: '123456789'
        bankId:
          description: Financial institution ID
          type: string
          example: IRVTUS3N
        bankName:
          description: The name of the financial institution
          type: string
          example: The Bank of New York Mellon
        fedWire:
          description: IMAD/OMAD unique number for the payment
          type: string
          example: 20260524ABCDXXXX012345
        memo:
          description: Note to Beneficiary
          type: string
          example: Quarterly dividend
        name:
          description: The name of the bank account holder
          type: string
          example: Satoshi Nakamoto
      title: FiatDetails
    TransactionType:
      description: |
        The type of transaction


        * "DEPOSIT" - A deposit has been detected in an Anchorage Digital vault


        * "WITHDRAW" - A withdraw of funds from your Anchorage Digital vault to another destination


        * "TRANSFER" - A transfer activity between Anchorage Digital vaults


        * "STAKING_REWARD" - A reward granted for staking contribution in certain currencies


        * "RESTAKING_REWARD" - A reward granted for restaking contribution in certain currencies


        * "ALLUVIAL_STAKING_REWARD" - A reward granted for staking contribution through Alluvial


        * "DELEGATION_REWARD" - A reward granted for delegation in certain currencies


        * "MEV_REWARD" - Maximal Extractable Value (MEV) reward granted while holding certain currencies


        * "PRIORITY_FEE_REWARD" - Priority fee reward granted for Jito priority fee distributions on Solana


        * "FIAT_INTEREST" - Fiat interest payment deposited into the account


        * "MINT" - Assets minted or created on the blockchain


        * "BURN" - Assets burned or destroyed on the blockchain


        * "DIEM_PREBURN" - A movement of assets on the Diem blockchain to a state of preburn


        * "GAS_STATION" - Funds received from the gas station to cover network fees


        * "OTHER" - Any other activity associated to your Anchorage Digital vault that isn't a deposit, withdraw, transfer, staking reward, delegation reward, mint, burn, or preburn transaction
      type: string
      example: WITHDRAW
      enum:
        - DEPOSIT
        - WITHDRAW
        - TRANSFER
        - STAKING_REWARD
        - RESTAKING_REWARD
        - ALLUVIAL_STAKING_REWARD
        - DELEGATION_REWARD
        - MEV_REWARD
        - PRIORITY_FEE_REWARD
        - FIAT_INTEREST
        - MINT
        - BURN
        - DIEM_PREBURN
        - GAS_STATION
        - OTHER
      title: TransactionType
    TransactionStatus:
      description: |
        A string describing the status of the given transaction


        * INITIATING - This transaction is being created


        * SUCCESS - This transaction has succeeded


        * NEEDS_APPROVAL - This transaction has begun but is awaiting approval by members of the quorum


        * INPROGRESS - This transaction is currently in progress


        * FAILURE - This transaction has failed


        * REJECTED - This transaction has been rejected


        * EXPIRED - This transaction has expired
      type: string
      enum:
        - INITIATING
        - SUCCESS
        - NEEDS_APPROVAL
        - INPROGRESS
        - FAILURE
        - REJECTED
        - EXPIRED
      title: TransactionStatus
    VaultDetails:
      type: object
      properties:
        accountName:
          description: Account name
          type: string
        assets:
          description: A list of the assets in this vault
          type: array
          items:
            $ref: '#/components/schemas/AssetDetails'
        description:
          description: A description of the vault
          type: string
        name:
          description: Vault name
          type: string
        type:
          description: Always VAULT
          type: string
        vaultId:
          description: An ID uniquely identifying an Anchorage Digital vault.
          type: string
          example: 1c920f4241b78a1d483a29f3c24b6c4c
      example:
        vaultId: 1c920f4241b78a1d483a29f3c24b6c4c
        name: Long Hold Vault
        description: For long-term investments
        type: VAULT
        accountName: Account name
        assets:
          - walletId: 3d293c0d64c703023692216e9b4f5280
            assetType: BTC
            availableBalance:
              quantity: '10.00000000'
              assetType: BTC
              currentPrice: '9751.01'
              currentUSDValue: '97510.1'
            totalBalance:
              quantity: '10.45234733'
              assetType: BTC
              currentPrice: '9751.01'
              currentUSDValue: '101920.94'
            stakedBalance:
              quantity: '32.00000000'
              assetType: BTC
              currentPrice: '9751.01'
              currentUSDValue: '312032.32'
            unclaimedBalance:
              quantity: '0'
              assetType: BTC
              currentPrice: '9751.01'
              currentUSDValue: '0'
            vaultId: 1c920f4241b78a1d483a29f3c24b6c4c
            vaultName: Long Hold Vault
      required:
        - vaultId
        - name
        - description
        - assets
        - type
      title: VaultDetails
    VaultsResponse:
      type: object
      properties:
        data:
          type: array
          items:
            $ref: '#/components/schemas/VaultDetails'
        page:
          $ref: '#/components/schemas/Page'
      required:
        - data
        - page
      title: VaultsResponse
    VaultsResponse1:
      type: object
      properties:
        data:
          $ref: '#/components/schemas/VaultDetails'
      required:
        - data
      title: VaultsResponse1
    Amount:
      description: |
        An amount of a crypto-asset represented by quantity, assetType, current unit price and current USD value.


        Fee amounts will be estimates if a transaction is not final.


        NOTE: price and USD value information is recent but does not reflect real-time data.
      type: object
      properties:
        assetType:
          description: |
            A string representing a type of crypto-asset, which usually corresponds to the crypto asset's ticker symbol.

            Use `/asset-types` to list all of the supported asset types for your organization.
          type: string
          example: BTC
        currentPrice:
          description: 'A recent assessment of the intra-day USD value of 1 unit of this asset type. This value is provided for convenience for such use cases as estimating point-in-time portfolio balances. This value does not represent authoritative pricing information used by Anchorage Digital for any purpose. The price is fetched as of the present, and may be omitted in certain contexts where more structured pricing information is provided (e.g. quotes and trades).'
          type: string
          example: '9751.01'
        currentUSDValue:
          description: 'The result of `quantity * currentPrice`, rounded to the nearest cent. A unitless number implicitly denominated in dollars. See `currentPrice` for methodology and disclaimers.'
          type: string
          example: '101920.94'
        quantity:
          description: 'The numeric value of this amount, excluding units'
          type: string
          example: '10.45234733'
      example:
        quantity: '10.45234733'
        assetType: BTC
        currentPrice: '9751.01'
        currentUSDValue: '101920.94'
      required:
        - quantity
        - assetType
      title: Amount
    AssetDetails:
      type: object
      properties:
        assetType:
          description: |
            A string representing a type of crypto-asset, which usually corresponds to the crypto asset's ticker symbol.

            Use `/asset-types` to list all of the supported asset types for your organization.
          type: string
          example: BTC
        availableBalance:
          $ref: '#/components/schemas/Amount'
        stakedBalance:
          $ref: '#/components/schemas/Amount'
        totalBalance:
          $ref: '#/components/schemas/Amount'
        unclaimedBalance:
          $ref: '#/components/schemas/Amount'
        vaultId:
          description: The unique ID of the vault that this asset is in
          type: string
        vaultName:
          description: The name of the vault that this asset is in
          type: string
        walletId:
          description: An ID uniquely identifying an Anchorage Digital wallet
          type: string
      example:
        walletId: 3d293c0d64c703023692216e9b4f5280
        assetType: BTC
        availableBalance:
          quantity: '10.00000000'
          assetType: BTC
          currentPrice: '9751.01'
          currentUSDValue: '97510.1'
        totalBalance:
          quantity: '10.45234733'
          assetType: BTC
          currentPrice: '9751.01'
          currentUSDValue: '101920.94'
        stakedBalance:
          quantity: '32.00000000'
          assetType: BTC
          currentPrice: '9751.01'
          currentUSDValue: '312032.32'
        unclaimedBalance:
          quantity: '0'
          assetType: BTC
          currentPrice: '9751.01'
          currentUSDValue: '0'
        vaultId: 1c920f4241b78a1d483a29f3c24b6c4c
        vaultName: Long Hold Vault
      required:
        - walletId
        - assetType
        - availableBalance
        - totalBalance
        - vaultId
        - vaultName
      title: AssetDetails
    AssetTypeDetails:
      description: A representation of the details a given crypto-asset
      type: object
      properties:
        assetType:
          description: |
            A string representing a type of crypto-asset, which usually corresponds to the crypto asset's ticker symbol.

            Use `/asset-types` to list all of the supported asset types for your organization.
          type: string
          example: BTC
        compatibleNetworkIds:
          description: Network IDs that share wallet key derivation with this asset's `networkId` and are enabled for your organization — the set valid to pass to the wallet activate and create endpoints. Empty when the network shares addresses with no other network. Excludes the asset's own `networkId`.
          type: array
          items:
            type: string
          example:
            - POLYGON
            - ARBITRUM
            - BASE
        decimals:
          description: The number of decimal places used to represent amounts of this asset type
          type: integer
          example: 8
        featureSupport:
          description: A list describing units of API functionality supported by this asset type
          type: array
          items:
            $ref: '#/components/schemas/SupportedFeature'
        name:
          description: A string representing the human-readable name of a crypto-asset.
          type: string
          example: Bitcoin
        networkId:
          description: The ID of the network for the given crypto-asset.
          type: string
          example: BTC
        onchainIdentifier:
          description: 'The onchain identifier for the given crypto-asset (for example, the contract address for ERC20 tokens). This value will omitted for native crypto-assets (ex: ETH, BTC, etc).'
          type: string
          example: '0xC02aaA39b223FE8D0A0e5C4F27eAD9083C756Cc2'
      required:
        - assetType
        - name
        - decimals
        - featureSupport
      title: AssetTypeDetails
    AssetTypesResponse:
      type: object
      properties:
        data:
          type: array
          items:
            $ref: '#/components/schemas/AssetTypeDetails'
          example:
            - assetType: BTC
              name: Bitcoin
              decimals: 8
              featureSupport:
                - TRANSFERS
                - HOLDS
              networkId: BTC
            - assetType: ETH
              name: Ethereum
              decimals: 18
              featureSupport:
                - TRANSFERS
                - HOLDS
              networkId: ETH
            - assetType: USDC
              name: USD Coin
              decimals: 6
              featureSupport:
                - TRANSFERS
                - HOLDS
              networkId: ETH
      required:
        - data
      title: AssetTypesResponse
    ErrorDetails:
      type: object
      properties:
        errorType:
          $ref: '#/components/schemas/ErrorType'
        message:
          description: A human-readable message providing more details about the error.
          type: string
          example: Missing required field 'amount'.
      required:
        - errorType
        - message
      title: ErrorDetails
    ErrorType:
      description: The type of error returned.
      type: string
      enum:
        - InternalError
        - InvalidRequest
        - Unauthenticated
        - Forbidden
        - NotFound
        - Conflict
        - UnprocessableEntity
        - TooManyRequests
        - ServiceUnavailable
        - QuoteExpired
        - InsufficientFunds
        - NotImplemented
        - MissingControlKey
        - InvalidControlKeyFormat
      title: ErrorType
    Page:
      description: Pagination info
      type: object
      properties:
        next:
          description: URL to use to query for the next page or null if no additional results are available
          type: string
          example: <next page url>
          nullable: true
          x-omitempty: false
      title: Page
    StrategyParams:
      type: object
      properties:
        endTime:
          description: 'The expire time for the order. An ISO-8601 UTC string of the form 2019-02-13T05:17:32.000000Z.'
          type: string
          format: date-time
          example: '2019-01-02T12:34:56.000Z'
          x-omitempty: true
        triggerPrice:
          description: The price that must be met to trigger execution of the order with the configured limit price.
          type: string
          example: '10000.00'
          x-omitempty: true
      title: Strategy Params
    SupportedFeature:
      description: A string describing a particular unit of API functionality
      type: string
      enum:
        - TRANSFERS
        - HOLDS
      title: SupportedFeature
    KYCApplicationEntry:
      type: object
      properties:
        key:
          description: Identifier of the question.
          type: string
        value:
          description: Answer for the given question.
          oneOf:
            - type: string
            - type: boolean
            - type: object
              additionalProperties: true
            - type: array
              items:
                type: object
                additionalProperties: true
      required:
        - key
        - value
    MarketDataResponse:
      type: object
      properties:
        data:
          description: Array of market data snapshots
          type: array
          items:
            $ref: '#/components/schemas/MarketDataSnapshot'
      required:
        - data
      title: MarketDataResponse
    MarketDataSnapshot:
      type: object
      properties:
        amountBuckets:
          description: Amount buckets used for market depth aggregation. Returns the USD amount values that were requested in the query. Empty array if amount buckets were not requested.
          type: array
          items:
            type: string
          example:
            - '1000'
            - '5000'
            - '10000'
        bids:
          description: Array of bid price levels
          type: array
          items:
            $ref: '#/components/schemas/PriceLevel'
        offers:
          description: Array of offer price levels
          type: array
          items:
            $ref: '#/components/schemas/PriceLevel'
        sizeBuckets:
          description: Size buckets used for market depth aggregation. Returns the BTC size values that were requested in the query. Empty array if size buckets were not requested.
          type: array
          items:
            type: string
          example:
            - '1'
            - '5'
            - '10'
        spread:
          description: Current spread as a decimal string
          type: string
          example: '0.001'
        status:
          description: Market status
          type: string
          example: Online
        symbol:
          description: Trading pair symbol
          type: string
          example: BTC-USD
        timestamp:
          description: 'UTC timestamp of the market data snapshot. [RFC 3339](https://datatracker.ietf.org/doc/html/rfc3339#section-5.6) ''date-time''.'
          type: string
          format: date-time
          example: '2025-05-08T16:17:01.863332Z'
      required:
        - timestamp
        - symbol
        - bids
        - offers
      title: MarketDataSnapshot
    OffchainVestingSchedulesResponse:
      type: object
      properties:
        data:
          type: array
          items:
            $ref: '#/components/schemas/OffchainVestingSchedule'
        page:
          $ref: '#/components/schemas/Page'
      required:
        - data
        - page
      title: OffchainVestingSchedulesResponse
    OffchainVestingSchedule:
      type: object
      properties:
        accountId:
          description: The account ID associated with this schedule
          type: string
        allocations:
          description: Breakdown of vesting schedule by wallet
          type: array
          items:
            $ref: '#/components/schemas/OffchainVestingWalletAllocation'
        assetType:
          description: 'The asset type abbreviation for this vesting schedule (e.g. BTC, ETH)'
          type: string
        endTime:
          description: 'End time of the vesting schedule in UTC following [RFC 3339](https://datatracker.ietf.org/doc/html/rfc3339#section-5.6) ''date-time'' format. A valid format example is `2021-01-01T00:00:00Z`.'
          type: string
          format: date-time
        organizationKeyId:
          description: The organization key ID
          type: string
        startTime:
          description: 'Start time of the vesting schedule in UTC following [RFC 3339](https://datatracker.ietf.org/doc/html/rfc3339#section-5.6) ''date-time'' format. A valid format example is `2021-01-01T00:00:00Z`.'
          type: string
          format: date-time
        status:
          description: Status of the vesting schedule
          type: string
          enum:
            - ACTIVE
            - CANCELLED
            - COMPLETED
        totalAmount:
          description: Total amount being vested
          type: string
        unstakeable:
          description: Whether the unvested tokens cannot be staked
          type: boolean
        vestedAmount:
          description: Amount that has already vested
          type: string
        vestingScheduleId:
          description: Unique identifier for the vesting schedule
          type: string
      required:
        - allocations
        - vestingScheduleId
        - accountId
        - organizationKeyId
        - totalAmount
        - vestedAmount
        - startTime
        - endTime
        - status
        - unstakeable
        - assetType
      title: OffchainVestingSchedule
    OffchainVestingWalletAllocation:
      type: object
      properties:
        totalAmount:
          description: Total amount being vested for this wallet
          type: string
        vestedAmount:
          description: Amount already vested for this wallet
          type: string
        vestingHolds:
          description: Vesting holds associated with this wallet
          type: array
          items:
            $ref: '#/components/schemas/OffchainVestingHold'
        walletId:
          description: Unique wallet identifier
          type: string
      required:
        - walletId
        - totalAmount
        - vestedAmount
        - vestingHolds
      title: OffchainVestingWalletAllocation
    OffchainVestingHold:
      type: object
      properties:
        endTime:
          description: 'End time for this hold in UTC following [RFC 3339](https://datatracker.ietf.org/doc/html/rfc3339#section-5.6) ''date-time'' format. A valid format example is `2021-01-01T00:00:00Z`.'
          type: string
          format: date-time
        holdAmount:
          description: Amount held by this vesting hold
          type: string
        holdId:
          description: Unique hold identifier
          type: string
        holdType:
          description: Type of vesting hold
          type: string
        startTime:
          description: 'Start time for this hold in UTC following [RFC 3339](https://datatracker.ietf.org/doc/html/rfc3339#section-5.6) ''date-time'' format. A valid format example is `2021-01-01T00:00:00Z`.'
          type: string
          format: date-time
      required:
        - holdId
        - holdAmount
        - holdType
        - startTime
        - endTime
      title: OffchainVestingHold
    PriceLevel:
      type: object
      properties:
        amount:
          description: Amount (in counter currency) available at this price level as a decimal string. Returned when amountBuckets parameter is used.
          type: string
          example: '100.00000000'
        price:
          description: Price level as a decimal string
          type: string
          example: '101022.85'
        size:
          description: Size available at this price level as a decimal string. Returned when sizeBuckets parameter is used.
          type: string
          example: '1.00000000'
      required:
        - price
      title: PriceLevel
    TagType:
      description: The ownership type of a tag.
      type: string
      enum:
        - system
        - backoffice
        - client
      title: TagType
    Tag:
      type: object
      properties:
        createdAt:
          description: When this tag was first applied to the entity. Only present when listing tags for a specific entity.
          type: string
          format: date-time
        name:
          description: 'The name of the tag (case-insensitive, max 25 chars)'
          type: string
          example: urgent
        tagType:
          $ref: '#/components/schemas/TagType'
        updatedAt:
          description: When this tag application was last updated (e.g. re-applied after removal). Only present when listing tags for a specific entity.
          type: string
          format: date-time
        version:
          description: Incremented each time this tag is (re-)applied to the entity. Only present when listing tags for a specific entity.
          type: integer
          example: 1
      required:
        - name
        - tagType
      title: Tag
    ListTagsResponse:
      type: object
      properties:
        data:
          type: array
          items:
            $ref: '#/components/schemas/Tag'
        page:
          $ref: '#/components/schemas/Page'
      required:
        - data
        - page
      title: ListTagsResponse
    CreateTagRequest:
      type: object
      properties:
        name:
          description: 'Tag name (max 25 chars, letters/numbers/underscores/hyphens only)'
          type: string
          example: urgent
          maxLength: 25
          pattern: '^[a-zA-Z0-9_-]+$'
        tagType:
          $ref: '#/components/schemas/TagType'
      required:
        - name
        - tagType
      title: CreateTagRequest
    CreateTagResponse:
      type: object
      properties:
        id:
          description: The unique identifier of the created tag
          type: string
          example: '208045946'
        name:
          description: The name of the tag
          type: string
          example: urgent
        tagType:
          $ref: '#/components/schemas/TagType'
      required:
        - id
        - name
        - tagType
      title: CreateTagResponse
    ApplyTagsRequest:
      type: object
      properties:
        entityId:
          description: The ID of the entity to tag
          type: string
          example: abc123
        entityType:
          description: 'The type of entity being tagged (e.g. transfer, withdrawal)'
          type: string
          example: withdrawal
        tags:
          description: 'The complete set of tag names for the entity within the given tag type. Apply replaces the entity''s tags of that type with this set: names not already present are added, names no longer present are removed, and an empty list clears all of the entity''s tags of that type. Tags of other types are not affected.'
          type: array
          items:
            type: string
        tagType:
          $ref: '#/components/schemas/TagType'
      required:
        - entityId
        - entityType
        - tagType
        - tags
      title: ApplyTagsRequest
    ApplyTagsResponse:
      type: object
      properties:
        tags:
          description: 'The tags applied to the entity, including their association metadata'
          type: array
          items:
            $ref: '#/components/schemas/AppliedTag'
      required:
        - tags
      title: ApplyTagsResponse
    AppliedTag:
      type: object
      properties:
        createdAt:
          description: When this tag was first applied to the entity
          type: string
          format: date-time
        name:
          description: The name of the tag
          type: string
          example: urgent
        tagType:
          $ref: '#/components/schemas/TagType'
        updatedAt:
          description: When this tag application was last updated (e.g. re-applied after removal)
          type: string
          format: date-time
        version:
          description: Incremented each time this tag is (re-)applied to the entity
          type: integer
          example: 1
      required:
        - name
        - tagType
        - createdAt
        - updatedAt
        - version
      title: AppliedTag
    DeleteAppliedTagResponse:
      type: object
      properties:
        deleted:
          description: The name of the tag that was removed
          type: string
          example: urgent
      required:
        - deleted
      title: DeleteAppliedTagResponse
    SearchTagsResponse:
      type: object
      properties:
        data:
          type: array
          items:
            $ref: '#/components/schemas/TaggingResult'
        page:
          $ref: '#/components/schemas/Page'
      required:
        - data
        - page
      title: SearchTagsResponse
    TaggingResult:
      type: object
      properties:
        createdAt:
          description: When the tag association was created (RFC3339)
          type: string
          example: '2026-03-19T10:00:00Z'
        entityId:
          description: The entity ID
          type: string
          example: abc123
        entityType:
          description: The entity type
          type: string
          example: withdrawal
        tags:
          description: Tags applied to this entity
          type: array
          items:
            $ref: '#/components/schemas/Tag'
      required:
        - entityId
        - entityType
        - createdAt
        - tags
      title: TaggingResult
    TradePairsResponse:
      type: object
      properties:
        data:
          type: array
          items:
            $ref: '#/components/schemas/TradePair'
          example:
            - pair: BTC-USD
              description: 'Buy BTC using USD, or Sell BTC for USD'
              referenceData:
                baseAssetType: BTC
                baseSizeIncrement: '0.001'
                quoteAssetType: USD
                quoteSizeIncrement: '0.01'
                priceIncrement: '0.00000001'
                minimumOrderSize: '0.005'
                lastUpdateTime: '2022-08-24T18:00:53.471Z'
            - pair: ETH-USD
              description: 'Buy ETH using USD, or Sell ETH for USD'
              referenceData:
                baseAssetType: ETH
                baseSizeIncrement: '0.001'
                quoteAssetType: USD
                quoteSizeIncrement: '0.01'
                priceIncrement: '0.00000001'
                minimumOrderSize: '0.05'
                lastUpdateTime: '2022-08-24T18:00:53.471Z'
            - pair: BTC-ETH
              description: 'Buy BTC using ETH, or Sell BTC for ETH'
          minItems: 1
          uniqueItems: true
      required:
        - data
      title: TradePairsResponse
    TradePair:
      description: A representation of a trade pair
      type: object
      properties:
        description:
          description: A string representing the human-readable name of the trade pair.
          type: string
          example: 'Buy Ethereum with Bitcoin, or Sell Ethereum for Bitcoin'
        pair:
          description: A string representing a trade between one type of currency and another.
          type: string
          example: BTC-ETH
        referenceData:
          $ref: '#/components/schemas/TradePairReferenceData'
      required:
        - pair
        - description
      title: TradePair
    TradePairReferenceData:
      description: |
        Trading reference data for a pair including the minimum size and price increment.

        Size increment is the minimum size supported when specifying order quantity.

        Price increment specifies the minimum price precision when specifying order price.
      type: object
      properties:
        baseAssetType:
          description: A string representing the base asset of the trading pair.
          type: string
          example: BTC
        baseSizeIncrement:
          description: Minimum size increment when specifying order quantity in base asset.
          type: string
          example: '0.000001'
        lastUpdateTime:
          description: ISO format date time when the reference data was last updated.
          type: string
          format: date-time
          example: '2022-07-30T22:15:31.99999Z'
        minimumOrderSize:
          description: Minimum required size for base asset to successfully place an order
          type: string
          example: '0.005'
        priceIncrement:
          description: Minimum price increment when specifying order price.
          type: string
          example: '0.00000001'
        quoteAssetType:
          description: A string representing the quote asset of the trading pair.
          type: string
          example: USD
        quoteSizeIncrement:
          description: Minimum size increment when specifying order quantity in quote asset.
          type: string
          example: '0.01'
      example:
        baseAssetType: BTC
        quoteAssetType: USD
        baseSizeIncrement: '0.0000001'
        quoteSizeIncrement: '0.01'
        priceIncrement: '0.00000001'
        minimumOrderSize: '0.005'
        lastUpdateTime: '2022-07-30T22:15:31.99999Z'
      required:
        - baseAssetType
        - quoteAssetType
        - baseSizeIncrement
        - quoteSizeIncrement
        - priceIncrement
        - minimumOrderSize
        - lastUpdateTime
      title: TradePairReferenceData
    NewAsyncOrder:
      type: object
      properties:
        accountId:
          description: Account ID for this order to book into.
          type: string
          example: 0e2b2f9d-8d10-4f1e-960b-28567255045f
        allocation:
          description: Order subaccount allocation
          type: array
          items:
            $ref: '#/components/schemas/OrderAllocation'
        clOrderId:
          description: Unique client order ID.
          type: string
          example: 6fb5fc79-0bb4-446d-82dd-d4687fb56a02
        currency:
          description: The currency in which order quantity is specified in.
          type: string
          example: BTC
        limitPrice:
          description: 'Limit price for the order, required for limit order'
          type: string
          example: '21005.5'
        orderType:
          description: 'Order type should be for BUY and SELL: LIMIT, STOP_LIMIT, TAKE_PROFIT_LIMIT. Only for SELL: STOP_LOSS'
          type: string
          enum:
            - LIMIT
            - STOP_LOSS
            - STOP_LIMIT
            - TAKE_PROFIT_LIMIT
        parameters:
          description: 'Optional order type parameters for STOP_LOSS, STOP_LIMIT and TAKE_PROFIT_LIMIT orders.'
          properties:
            endTime:
              description: 'Optional expire time for the order. Date-times are always in UTC [RFC 3339](https://datatracker.ietf.org/doc/html/rfc3339#section-5.6) ''date-time''.'
              type: string
              format: date-time
            triggerPrice:
              description: 'The price that must be met to trigger execution of the order. Required for STOP_LIMIT, TAKE_PROFIT_LIMIT and STOP_LOSS.'
              type: string
              example: '21005.5'
          type: object
        quantity:
          description: Order quantity in units of currency.
          type: string
          example: '100.00'
        side:
          description: 'Order side, either "BUY" or "SELL".'
          type: string
          enum:
            - BUY
            - SELL
        specLotId:
          description: 'Optional specification lot ID for tax reporting purposes. Only applicable for SELL orders with timeInForce FOK. When provided, instructs the tax service to retire the specified lot.'
          type: string
          example: 550e8400-e29b-41d4-a716-446655440000
        subaccountId:
          description: Subaccount ID for this order to book into.
          type: string
          example: 343b6c83-6d91-4f13-9982-2109abd2dbb0
        symbol:
          description: 'Symbol for the order, e.g. BTC-USD.'
          type: string
          example: BTC-USD
        timeInForce:
          description: Time in Force specifies how long the order remains in effect
          type: string
          enum:
            - FOK
            - IOC
            - GTC
        timestamp:
          description: 'Timestamp when submitting this order. Date-times are always in UTC [RFC 3339](https://datatracker.ietf.org/doc/html/rfc3339#section-5.6) ''date-time''.'
          type: string
          format: date-time
      required:
        - clOrderId
        - symbol
        - side
        - currency
        - quantity
        - orderType
        - timeInForce
        - timestamp
      title: NewAsyncOrder
    AsyncOrderResponse:
      type: object
      properties:
        data:
          $ref: '#/components/schemas/AsyncOrderExecutionReport'
      required:
        - data
      title: AsyncOrderResponse
    AsyncOrderExecutionReport:
      type: object
      properties:
        accountId:
          description: Account ID for this order to book into.
          type: string
          example: 0e2b2f9d-8d10-4f1e-960b-28567255045f
        allocation:
          description: Subaccount allocation
          type: array
          items:
            $ref: '#/components/schemas/Allocation'
          x-omitempty: true
        avgPx:
          description: Average filled price for this order.
          type: string
          example: '21005.4'
        avgPxAllIn:
          description: Average filled price + anchorage commission.
          type: string
          example: '21006.00'
        cancelQty:
          description: quantity canceled for this order.
          type: string
          example: '10000.00'
        clOrderId:
          description: Original client order ID as submitted.
          type: string
          example: 6fb5fc79-0bb4-446d-82dd-d4687fb56a02
        counterCurrency:
          description: The counter currency of the order.
          type: string
          example: BTC
        counterQty:
          description: Filled quantity of the counter currency.
          type: string
          example: '0.001'
        counterQtyAllIn:
          description: Filled quantity of the counter currency including all fees.
          type: string
          example: '0.0012'
        cumQty:
          description: Cumulative filled quantity for this order.
          type: string
          example: '10000.00'
        currency:
          description: The currency in which order quantity is specified in.
          type: string
          example: USD
        execId:
          description: Execution ID of this report. This ID can be used to retrieve the trade.
          type: string
          example: 3fb532c79-0bb4-446d-82dd-d4687fb56a02
        execType:
          description: Describes the specific execution (e.g. PENDING_NEW) while OrdStatus will always identify the current order status (e.g. PARTIALLY_FILLED).
          type: string
          example: PENDING_NEW
          enum:
            - PENDING_NEW
            - REJECTED
        fee:
          description: Commission charged for this order.
          type: string
          example: '10.0'
        feeCurrency:
          description: 'Currency commission was charged in, which is always the opposite currency from what the order quantity is specified in.'
          type: string
          example: BTC
        leavesQty:
          description: quantity that is still open for this order.
          type: string
          example: '10000.00'
        limitPrice:
          description: 'Original limit price for this order if present. Required for LIMIT, STOP_LIMIT and TAKE_PROFIT_LIMIT'
          type: string
          example: '21005.5'
        orderId:
          description: Order ID generated by anchorage.
          type: string
          example: a94c8d75-6c9d-4903-95f3-5b0893e76cb7
        orderQty:
          description: Original order quantity.
          type: string
          example: '10000.00'
        orderStatus:
          description: Order status
          type: string
          enum:
            - FILLED
            - REJECTED
            - CANCELED
            - PENDING_NEW
            - PARTIALLY_FILLED
            - PENDING_CANCEL
        orderType:
          description: 'Order type will be LIMIT, STOP_LIMIT, TAKE_PROFIT_LIMIT or STOP_LOSS'
          type: string
          enum:
            - LIMIT
            - STOP_LIMIT
            - TAKE_PROFIT_LIMIT
            - STOP_LOSS
        reasonText:
          description: Additional description for reason of reject or cancel.
          type: string
        rejectReason:
          description: 'Reason for rejection, this is a set of standardized reason code.'
          type: string
          enum:
            - InvalidTimeInForce
            - InvalidSymbol
            - InvalidCurrency
            - InvalidSide
            - InvalidQuantity
            - InvalidOrderType
            - InvalidAccount
            - AccountDisabledForTrading
            - UnauthorizedForTrading
            - InsufficientLiquidity
            - DuplicateOrder
            - ExecutionLimitExceeded
            - InternalError
            - InvalidPrice
            - InvalidLimitPrice
            - InvalidTriggerPrice
            - OrderNotCancelable
            - InvalidAccountsInAllocation
            - InvalidCurrencyForFOK
            - InvalidSideForSpecLotID
            - InvalidTimeInForceForSpecLotID
            - InvalidAllocation
        side:
          description: 'Order side, either "BUY" or "SELL".'
          type: string
          enum:
            - BUY
            - SELL
        subaccountId:
          description: Subaccount ID for this order to book into.
          type: string
          example: 0e2b2f9d-8d10-4f1e-960b-28567255045f
        submitTime:
          description: 'UTC timestamp when order is submitted. [RFC 3339](https://datatracker.ietf.org/doc/html/rfc3339#section-5.6) ''date-time''.'
          type: string
          format: date-time
        symbol:
          description: 'Symbol for the order, e.g. BTC-USD.'
          type: string
          example: BTC-USD
        timeInForce:
          description: Order Time in Force
          type: string
          enum:
            - FOK
            - IOC
            - GTC
        transactTime:
          description: 'UTC timestamp when order is executed. [RFC 3339](https://datatracker.ietf.org/doc/html/rfc3339#section-5.6) ''date-time''.'
          type: string
          format: date-time
      required:
        - clOrderId
        - orderId
        - symbol
        - side
        - currency
        - counterCurrency
        - orderType
        - orderStatus
        - avgPx
        - orderQty
        - cumQty
        - counterQty
        - counterQtyAllIn
        - transactTime
        - submitTime
      title: OrderExecutionReport
  securitySchemes:
    Api-Access-Key:
      type: apiKey
      name: Api-Access-Key
      in: header
      description: An API key associated with a security role
tags:
  - description: |
      These endpoints allow querying information about the current API key in use.
    name: API Key
  - description: Descriptions of supported asset types
    name: Asset Types
  - description: "These endpoints allow the user to create and retrieve deposit addresses for specific assets.\n\n# Verifying Deposit Addresses\n\nThe addresses REST API endpoints return signatures of the address strings and other metadata that prove the address was generated by Anchorage Digital for your organization. \n\nIt is critical that clients verify the address signature and any accompanying metadata before the address is used, to confirm the address authenticity and integrity.\n\n## Address Signature Schemes\n\nThe API supports two address verification schemes:\n\n- **V1 Address Signatures** - The original scheme involves verifying a signature against a public key that is unique to each organization. This public key remains fixed for the lifetime of the organization and is distributed on request by Anchorage Digital out-of-band. While the public key does not need to be kept confidential, it must be kept tamper-proof.\n- **V2 Address Signatures** - The newer scheme involves verifying a signature against the public key of the leaf certificate of a X509 certificate chain returned alongside the signature, and verifying the certificate chain itself against the Anchorage Digital Address Signing Root CA, provided below, which must be hard-coded by API clients.\n\nYou can determine which scheme an address uses by checking the `signatureVersion` field.\n\n## V1 Address Signature Verification\n\nThe steps for verifying V1 address signatures are as follows:\n\n1. Check the validity of the signature:\n    a. Decode the `addressSignaturePayload` field from hex to bytes.\n    b. Decode the `signature` field from hex to bytes.\n    c. Using the fixed public key for this organization, verify that `signatureBytes` is a valid Ed25519 signature of the `addressSignaturePayloadBytes`.\n2. Verify the signed address matches the address to be used:\n    a. Decode the `addressSignaturePayload` field from hex to bytes.\n    b. Parse the bytes as a JSON object.\n    c. Verify the address to be used matches the value of the `TextAddress` property from the JSON object.\n\n**Note: It is not sufficient to validate the signature without also validating that the address contained in the JSON decoded from the `addressSignaturePayload` matches the address to be used.**\n\n### V1 Signed Payload Fields\n\n- `TextAddress` — The text format of the on-chain address.\n\n```json\n{\n  \"TextAddress\": \"2N19AcihQ1a4MxQW658UFHTioUNnMkiHPkw\"\n}\n```\n\n### Sample V1 validation code:\n\n```go\npackage main\n\nimport (\n\t\"crypto/ed25519\"\n\t\"encoding/hex\"\n\t\"encoding/json\"\n\t\"fmt\"\n)\n\n// V1SignedPayload represents the JSON structure in the addressSignaturePayload for V1 signatures\ntype V1SignedPayload struct {\n\tTextAddress string `json:\"TextAddress\"`\n}\n\n// verifyV1AddressSignature verifies a V1 address signature.\n//\n// Parameters:\n//   - address: The address string from the API response\n//   - addressSignaturePayload: Hex-encoded bytes that were signed\n//   - signature: Hex-encoded Ed25519 signature\n//   - orgPublicKeyHex: Hex-encoded Ed25519 public key for your organization (obtained out-of-band)\n//\n// Returns an error if verification fails.\nfunc verifyV1AddressSignature(address, addressSignaturePayload, signature, orgPublicKeyHex string) error {\n\t// Step 1: Check the validity of the signature\n\n\t// Decode the addressSignaturePayload from hex to bytes\n\tpayloadBytes, err := hex.DecodeString(addressSignaturePayload)\n\tif err != nil {\n\t\treturn fmt.Errorf(\"failed to decode addressSignaturePayload: %w\", err)\n\t}\n\n\t// Decode the signature from hex to bytes\n\tsignatureBytes, err := hex.DecodeString(signature)\n\tif err != nil {\n\t\treturn fmt.Errorf(\"failed to decode signature: %w\", err)\n\t}\n\n\t// Decode the organization public key from hex\n\tpublicKeyBytes, err := hex.DecodeString(orgPublicKeyHex)\n\tif err != nil {\n\t\treturn fmt.Errorf(\"failed to decode organization public key: %w\", err)\n\t}\n\n\tif len(publicKeyBytes) != ed25519.PublicKeySize {\n\t\treturn fmt.Errorf(\"invalid public key size: got %d bytes, expected %d\", len(publicKeyBytes), ed25519.PublicKeySize)\n\t}\n\n\tpublicKey := ed25519.PublicKey(publicKeyBytes)\n\n\t// Verify the Ed25519 signature\n\tif !ed25519.Verify(publicKey, payloadBytes, signatureBytes) {\n\t\treturn fmt.Errorf(\"signature verification failed\")\n\t}\n\n\t// Step 2: Verify the signed address matches the address to be used\n\n\t// Parse the payload bytes as JSON\n\tvar signedPayload V1SignedPayload\n\tif err := json.Unmarshal(payloadBytes, &signedPayload); err != nil {\n\t\treturn fmt.Errorf(\"failed to parse signed payload: %w\", err)\n\t}\n\n\t// Verify the TextAddress matches\n\tif signedPayload.TextAddress != address {\n\t\treturn fmt.Errorf(\"signed TextAddress does not match: signed=%q, expected=%q\", signedPayload.TextAddress, address)\n\t}\n\n\treturn nil\n}\n\nfunc main() {\n\t// Sample API response data\n\taddress := \"2N19AcihQ1a4MxQW658UFHTioUNnMkiHPkw\"\n\taddressSignaturePayload := \"7b225465787441646472657373223a22324e313941636968513161344d78515736353855464854696f554e6e4d6b6948506b77227d\"\n\tsignature := \"b18f6848dc0fef01a069e7ac26046383bf5cd130203994dc2d72b5a9097351b1e8b67115b63124fbc8c16673566416a635913c670b676089339c62a7824baa03\"\n\n\t// Organization public key - obtained out-of-band from Anchorage Digital beforehand\n\t// Unique per Organization, fixed for the lifetime of that Organization\n\t// Must be kept tamper-proof\n\torgPublicKeyHex := \"8a88e3dd7409f195fd52db2d3cba5d72ca6709bf1d94121bf3748801b40f6f5c\"\n\n\t// Verify the signature\n\tif err := verifyV1AddressSignature(address, addressSignaturePayload, signature, orgPublicKeyHex); err != nil {\n\t\tfmt.Printf(\"✗ V1 Address signature verification failed: %v\\n\", err)\n\t\treturn\n\t}\n\n\tfmt.Println(\"✓ V1 Address signature verified successfully!\")\n\tfmt.Printf(\"  Address: %s\\n\", address)\n\tfmt.Println(\"\\nYou may now safely use this address for deposits.\")\n}\n```\n\n## V2 Address Signature Verification\n\nAddresses returned with `signatureVersion` set to `V2` also include a `certChain` field containing an x509 certificate chain in PEM format.\n\nThe steps for verifying V2 address signatures are as follows:\n\n1. Verify the certificate chain:\n    a. Parse the `certChain` field as PEM-encoded x509 certificates \n \n        **Note: The leaf certificate is at the 0th index, followed by zero or more intermediate certificates. The root cert is excluded from this response. The number of certificates in the chain is subject to change.**\n \n    b. Verify the certificate chain from the leaf to the trusted Anchorage Digital Root CA.\n    c. Verify all certificates are valid at the current time (both notAfter and notBefore).\n    d. Verify the leaf certificate's Subject Alternative Names include `address-provider.anchorage.internal`.\n    e. Verify the leaf certificate's KeyUsage includes both `digitalSignature` and `nonRepudiation` (also known as `contentCommitment`).\n    f. Extract the  public key from the leaf certificate. Currently, we only support ed25519 keys, however this is subject to change the future.\n2. Verify the signature:\n    a. Decode the `addressSignaturePayload` field from hex to bytes\n    b. Decode the `signature` field from hex to bytes\n    c. Using the public key from the leaf certificate, verify that `signatureBytes` is a valid signature of the `addressSignaturePayload` bytes.\n3. Verify the signed details:\n    a. Parse the `addressSignaturePayload` bytes as a JSON object\n    b. Verify `SignatureExpiresAt` is greater or equal to the current UTC Unix Timestamp\n    c. Verify `TextAddress` matches the address to be used\n    d. Verify `VaultId` matches your expected Vault ID\n    e. Verify `NetworkId` matches the expected network for this address\n\n**Note: The signed payload also includes a `NetworkName` field for human-readable purposes, which does not need to be verified.**\n\n**Note: API clients must not use \"strict\" JSON parsers which will disallow extra properties, as future versions may introduce additional fields.**\n\n**Note: Anchorage Digital will periodically refresh V2 signatures and our Address Signing Root CA before expiration. The deposit address itself will not change. Only the signature, certificate chain and Root CA will be updated.**\n\n### V2 Signed Payload Fields\n\n- `TextAddress` — The text format of the on-chain address.\n- `VaultId` — Identifies the vault this address belongs to.\n- `NetworkId` — Identifies the network that this address can receive deposits on.\n- `NetworkName` — A human readable version of the `NetworkId`.\n- `SignatureExpiresAt` — The time after which the signature should not be trusted.\n\n```json\n{\n  \"VaultId\": \"dae6089e7c0836705f0562af0f1e4e1f\",\n  \"TextAddress\": \"bcrt1q709skemgf5skpsnysvgme2s3ztehkutl390yl0wp29lnmum5uw7qg0qrwm\",\n  \"NetworkName\": \"Bitcoin Regnet\",\n  \"NetworkId\": \"BTC_R\",\n  \"SignatureExpiresAt\": 1769450713\n}\n```\n\n### Anchorage Digital Address Signing Root CAs\n\nClients are encouraged to hard-code the appropriate Root CA value for the environment they are making API requests against. It is essential that this value be tamper-proof.\n\n- Production Environment:\n\n```\n-----BEGIN CERTIFICATE-----\nMIIBXTCCAQ+gAwIBAgIUQZI+MSvYTXQHra+3OAKnwAMzotUwBQYDK2VwMCAxHjAcBgNVBAMMFWNhLmFuY2hvcmFnZS5pbnRlcm5hbDAeFw0yNjAxMjYwMDAwMDBaFw0yNzAxMjYwMDAwMDBaMCAxHjAcBgNVBAMMFWNhLmFuY2hvcmFnZS5pbnRlcm5hbDAqMAUGAytlcAMhADTh1nctgIHtAKNW8ww/bY606pJ3OP2dyZYcQrU2kG5jo1swWTAPBgNVHRMBAf8EBTADAQH/MA4GA1UdDwEB/wQEAwICBDAUBgorBgEEAYaNHwEBBAYWBHJvb3QwIAYDVR0RBBkwF4IVY2EuYW5jaG9yYWdlLmludGVybmFsMAUGAytlcANBANkkdudEjH9RTKbRAxrRXyMSS/TgmdSrAVYOZzoRDJlyc+5oD+a0pmmwWVe86xZi37YbN1GzVlXcJAPpV6ceEQU=\n-----END CERTIFICATE-----\n```\n\n- Staging Environment:\n\n```\n-----BEGIN CERTIFICATE-----\nMIIBXDCCAQ6gAwIBAgITOfTQ4rYUsghgvdl8YCJSC67uGDAFBgMrZXAwIDEeMBwGA1UEAwwVY2EuYW5jaG9yYWdlLmludGVybmFsMB4XDTI2MDEyNDAwMDAwMFoXDTI3MDEyNDAwMDAwMFowIDEeMBwGA1UEAwwVY2EuYW5jaG9yYWdlLmludGVybmFsMCowBQYDK2VwAyEAPlBo2/+kPPL0WRpT+B/yHsU25AN/M6HP2bzC61yHb4ajWzBZMA8GA1UdEwEB/wQFMAMBAf8wDgYDVR0PAQH/BAQDAgIEMBQGCisGAQQBho0fAQEEBhYEcm9vdDAgBgNVHREEGTAXghVjYS5hbmNob3JhZ2UuaW50ZXJuYWwwBQYDK2VwA0EAYsJxVI9n42liCF9f+Ou7uuC1QGFwaHwFsfOm0WFofSlE1trWqzj4ruzjPYSRJc8Ht2A7XCAfXkG0mzKpL/wQDg==\n-----END CERTIFICATE-----\n```\n\n### Sample V2 validation code:\n\n```go\npackage main\n\nimport (\n\t\"crypto/ed25519\"\n\t\"crypto/x509\"\n\t\"encoding/hex\"\n\t\"encoding/json\"\n\t\"encoding/pem\"\n\t\"fmt\"\n\t\"time\"\n)\n\n// V2SignedPayload represents the JSON structure in the addressSignaturePayload for V2 signatures\ntype V2SignedPayload struct {\n\tTextAddress        string `json:\"TextAddress\"`\n\tVaultId            string `json:\"VaultId\"`\n\tNetworkId          string `json:\"NetworkId\"`\n\tNetworkName        string `json:\"NetworkName\"`\n\tSignatureExpiresAt int64  `json:\"SignatureExpiresAt\"` // Unix timestamp\n}\n\n// verifyV2AddressSignature verifies a V2 address signature.\n//\n// Parameters:\n//   - now: The \"current\" time. Note that conforming implementations must use\n//     a trusted source for the current time.\n//   - address: The address string from the API response\n//   - addressSignaturePayload: Hex-encoded bytes that were signed\n//   - signature: Hex-encoded signature\n//   - certChainPEM: PEM-encoded certificate chain (leaf first, then intermediates)\n//   - rootCAPEM: PEM-encoded Root CA certificate (hard-coded by client)\n//   - expectedVaultId: Your Vault ID to verify against the signed VaultId\n//   - expectedNetworkId: Expected network ID for this address (e.g., \"BTC\", \"ETH\")\n//\n// Returns an error if verification fails.\nfunc verifyV2AddressSignature(\n\tnow time.Time,\n\taddress, addressSignaturePayload, signature, certChainPEM, rootCAPEM, expectedVaultId, expectedNetworkId string,\n) error {\n\t// Step 1: Verify the certificate chain\n\n\t// Parse the certificate chain from PEM\n\tcerts, err := parsePEMCertificates([]byte(certChainPEM))\n\tif err != nil {\n\t\treturn fmt.Errorf(\"failed to parse certificate chain: %w\", err)\n\t}\n\n\tif len(certs) == 0 {\n\t\treturn fmt.Errorf(\"certificate chain is empty\")\n\t}\n\n\tleafCert := certs[0]\n\tvar intermediateCerts []*x509.Certificate\n\tif len(certs) > 1 {\n\t\tintermediateCerts = certs[1:]\n\t}\n\n\t// Parse the Root CA\n\trootCACerts, err := parsePEMCertificates([]byte(rootCAPEM))\n\tif err != nil {\n\t\treturn fmt.Errorf(\"failed to parse Root CA: %w\", err)\n\t}\n\tif len(rootCACerts) != 1 {\n\t\treturn fmt.Errorf(\"expected exactly one Root CA certificate, got %d\", len(rootCACerts))\n\t}\n\trootCA := rootCACerts[0]\n\n\t// Verify the leaf certificate's KeyUsage includes both\n\t// digitalSignature and nonRepudiation (AKA contentCommitment)\n\tif leafCert.KeyUsage&x509.KeyUsageDigitalSignature == 0 {\n\t\treturn fmt.Errorf(\"leaf certificate KeyUsage missing DigitalSignature\")\n\t}\n\tif leafCert.KeyUsage&x509.KeyUsageContentCommitment == 0 {\n\t\treturn fmt.Errorf(\"leaf certificate KeyUsage missing NonRepudiation (ContentCommitment)\")\n\t}\n\n\t// Verify the certificate chain from leaf to Root CA\n\troots := x509.NewCertPool()\n\troots.AddCert(rootCA)\n\n\tintermediates := x509.NewCertPool()\n\tfor _, cert := range intermediateCerts {\n\t\tintermediates.AddCert(cert)\n\t}\n\n\t// NOTE: Not all x509 libraries are created equal and are not\n\t// guaranteed to verify exactly the same things!\n\t//\n\t// Always review the library you plan to use and ensure it covers the\n\t// checks described in the User Guide!\n\t//\n\t// For example, the Go implementation checks all Certificates for\n\t// temporal validity (notBefore and notAfter against CurrentTime), for\n\t// valid signatures up the chain, and checks that the Subject\n\t// Alternative Names include the values in DNSNames below.\n\t//\n\t// However it does not check the KeyUsage bits, hence the additional\n\t// checks above.\n\topts := x509.VerifyOptions{\n\t\tDNSNames:      []string{\"address-provider.anchorage.internal\"},\n\t\tRoots:         roots,\n\t\tIntermediates: intermediates,\n\t\tCurrentTime:   now,\n\t\t// NOTE: This allows for any Extended Key Usage, but does not\n\t\t// check the Key Usage bits, hence the additional checks above.\n\t\tKeyUsages: []x509.ExtKeyUsage{x509.ExtKeyUsageAny},\n\t}\n\tif _, err := leafCert.Verify(opts); err != nil {\n\t\treturn fmt.Errorf(\"certificate chain verification failed: %w\", err)\n\t}\n\n\t// Extract the public key from the leaf certificate\n\tleafPublicKey, ok := leafCert.PublicKey.(ed25519.PublicKey)\n\tif !ok {\n\t\treturn fmt.Errorf(\"leaf certificate does not use Ed25519 (got type %T)\", leafCert.PublicKey)\n\t}\n\n\t// Step 2: Verify the signature\n\n\t// Decode the addressSignaturePayload from hex to bytes\n\tpayloadBytes, err := hex.DecodeString(addressSignaturePayload)\n\tif err != nil {\n\t\treturn fmt.Errorf(\"failed to decode addressSignaturePayload: %w\", err)\n\t}\n\n\t// Decode the signature from hex to bytes\n\tsignatureBytes, err := hex.DecodeString(signature)\n\tif err != nil {\n\t\treturn fmt.Errorf(\"failed to decode signature: %w\", err)\n\t}\n\n\t// Verify the signature using the leaf certificate's public key\n\tif !ed25519.Verify(leafPublicKey, payloadBytes, signatureBytes) {\n\t\treturn fmt.Errorf(\"signature verification failed\")\n\t}\n\n\t// Step 3: Verify the signed details\n\n\t// Parse the payload bytes as JSON\n\tvar signedPayload V2SignedPayload\n\tif err := json.Unmarshal(payloadBytes, &signedPayload); err != nil {\n\t\treturn fmt.Errorf(\"failed to parse signed payload: %w\", err)\n\t}\n\n\t// Verify SignatureExpiresAt is not in the past\n\tif now.Unix() > signedPayload.SignatureExpiresAt {\n\t\texpiryTime := time.Unix(signedPayload.SignatureExpiresAt, 0)\n\t\treturn fmt.Errorf(\"signature has expired at %s\", expiryTime)\n\t}\n\n\t// Verify TextAddress matches\n\tif signedPayload.TextAddress != address {\n\t\treturn fmt.Errorf(\"signed TextAddress does not match: signed=%q, expected=%q\",\n\t\t\tsignedPayload.TextAddress, address)\n\t}\n\n\t// Verify VaultId matches\n\tif signedPayload.VaultId != expectedVaultId {\n\t\treturn fmt.Errorf(\"signed VaultId does not match: signed=%q, expected=%q\",\n\t\t\tsignedPayload.VaultId, expectedVaultId)\n\t}\n\n\t// Verify NetworkId matches\n\tif signedPayload.NetworkId != expectedNetworkId {\n\t\treturn fmt.Errorf(\"signed NetworkId does not match: signed=%q, expected=%q\",\n\t\t\tsignedPayload.NetworkId, expectedNetworkId)\n\t}\n\n\treturn nil\n}\n\n// parsePEMCertificates parses PEM-encoded certificates and returns them as a slice\nfunc parsePEMCertificates(pemData []byte) ([]*x509.Certificate, error) {\n\tvar certs []*x509.Certificate\n\n\tfor {\n\t\tblock, rest := pem.Decode(pemData)\n\t\tif block == nil {\n\t\t\tbreak\n\t\t}\n\n\t\tif block.Type != \"CERTIFICATE\" {\n\t\t\tpemData = rest\n\t\t\tcontinue\n\t\t}\n\n\t\tcert, err := x509.ParseCertificate(block.Bytes)\n\t\tif err != nil {\n\t\t\treturn nil, fmt.Errorf(\"failed to parse certificate: %w\", err)\n\t\t}\n\n\t\tcerts = append(certs, cert)\n\t\tpemData = rest\n\t}\n\n\treturn certs, nil\n}\n\nfunc main() {\n\t// Sample API response data\n\taddress := \"bcrt1q709skemgf5skpsnysvgme2s3ztehkutl390yl0wp29lnmum5uw7qg0qrwm\"\n\taddressSignaturePayload := \"7b225661756c744964223a226461653630383965376330383336373035663035363261663066316534653166222c225465787441646472657373223a22626372743171373039736b656d676635736b70736e797376676d653273337a7465686b75746c333930796c30777032396c6e6d756d357577377167307172776d222c224e6574776f726b4e616d65223a22426974636f696e205265676e6574222c224e6574776f726b4964223a224254435f52222c225369676e6174757265457870697265734174223a313736393435303731337d\"\n\tsignature := \"951eb2fb560e660aa9c3d1ccd120d3ad1a19d90d8747347057e48bf174330eb386089e3232d822fd66b8183cce8059c91183afde299b920a0e0c05c5b167360e\"\n\tcertChainPEM := `-----BEGIN CERTIFICATE-----\nMIIBYTCCAROgAwIBAgIUMLKt+K9eFku+P7BbefE1xAHg0hcwBQYDK2VwMAAwHhcNMjYwMTI2MTcwNDEzWhcNMjcwMTI2MTcwNTEzWjAuMSwwKgYDVQQDEyNhZGRyZXNzLXByb3ZpZGVyLmFuY2hvcmFnZS5pbnRlcm5hbDAqMAUGAytlcAMhAPsgM70aWFYsZaLHawtYJpl42BkiTLyCq96+OXe4FxrVo3EwbzAOBgNVHQ8BAf8EBAMCBsAwDAYDVR0TAQH/BAIwADAfBgNVHSMEGDAWgBS0usSFeB2gjC+wcowtxN3MeKSH7zAuBgNVHREEJzAlgiNhZGRyZXNzLXByb3ZpZGVyLmFuY2hvcmFnZS5pbnRlcm5hbDAFBgMrZXADQQCXmvIkuPnUgCHxWmFmzvgWdv9lUlt84oZCel+OeJW9n8PR88tGxAcD1E3+KDBXVpO0GcRA0W9+xqqICAo2ROEJ\n-----END CERTIFICATE-----\n-----BEGIN CERTIFICATE-----\nMIIBKDCB26ADAgECAhRGsD05KldIse+uIEa976AijTqlxjAFBgMrZXAwADAeFw0yNjAxMjYxNzA0MTNaFw0yNzAxMjYxNzA1MTNaMAAwKjAFBgMrZXADIQCNpyY5Sr21FHNvvLkBKG8AEMKdhqtajmV5d2QaZlmtAqNnMGUwDgYDVR0PAQH/BAQDAgIEMBIGA1UdEwEB/wQIMAYBAf8CAQAwHQYDVR0OBBYEFLS6xIV4HaCML7ByjC3E3cx4pIfvMCAGA1UdEQEB/wQWMBSCEmFuY2hvcmFnZS5pbnRlcm5hbDAFBgMrZXADQQCIgw6kLMIwhd3ACjG03cJ5z/ZZp8aXXycFq2ZC9TLhieJ3rncyMH6ZdyJ3Ai1eVaHs4vnDCv54Vdh83vvSky4K\n-----END CERTIFICATE-----\n`\n\n\t// NOTE: This is a FAKE Root CA used just for this example.\n\t// NOTE: Conforming client implementations should hard-code the real\n\t// Anchorage Digital Address Signing Root CA for the environment they\n\t// are making requests to.\n\trootCAPEM := `-----BEGIN CERTIFICATE-----\nMIIBGzCBzqADAgECAhQ2qQwArneTuF0dbNDs8i/ExuyW2DAFBgMrZXAwADAeFw0yNjAxMjYxNzA0MTNaFw0yNzAxMjYxNzA1MTNaMAAwKjAFBgMrZXADIQB+gEnytXKnuAMonIWGWnB0qyTqa0aw3l9u5VRbu86UgaNaMFgwDgYDVR0PAQH/BAQDAgIEMA8GA1UdEwEB/wQFMAMBAf8wHQYDVR0OBBYEFOj64tL1teJHkojsiblnnK34Tw+EMBYGA1UdEQEB/wQMMAqCCGludGVybmFsMAUGAytlcANBAAg2IcVEXmWKSivhUNSatNfMmASxi83QscIuyP/sIW2sRIuCqQJoo9lN6TaxzyV62cQMzthFOCZcgRE+k0JV7Ao=\n-----END CERTIFICATE-----\n`\n\n\t// Your Vault ID - obtained from your application context\n\texpectedVaultId := \"dae6089e7c0836705f0562af0f1e4e1f\"\n\n\t// Expected network ID for this address\n\texpectedNetworkId := \"BTC_R\"\n\n\t// Implementations should use the actual current time\n\t// now := time.Now()\n\tnow := time.Unix(1769450600, 0) // Fake time so that this example passes.\n\n\t// Verify the signature\n\tif err := verifyV2AddressSignature(\n\t\tnow,\n\t\taddress,\n\t\taddressSignaturePayload,\n\t\tsignature,\n\t\tcertChainPEM,\n\t\trootCAPEM,\n\t\texpectedVaultId,\n\t\texpectedNetworkId,\n\t); err != nil {\n\t\tfmt.Printf(\"✗ V2 Address signature verification failed: %v\\n\", err)\n\t\treturn\n\t}\n\n\tfmt.Println(\"✓ V2 Address signature verified successfully!\")\n\tfmt.Printf(\"  Address: %s\\n\", address)\n\tfmt.Printf(\"  Vault ID: %s\\n\", expectedVaultId)\n\tfmt.Printf(\"  Network: %s\\n\", expectedNetworkId)\n\tfmt.Println(\"\\nYou may now safely use this address for deposits.\")\n}\n```\n"
    name: Addresses
  - description: |
      Deposit Attribution is the process of gathering information about the originator of a given deposit.

      Once a deposit is initiated this process is automatically started being represented by a Deposit Attribution entity in `PENDING` status, so a deposit transaction has always an associated Deposit Attribution process and funds are not available until an attribution is performed.

      Once a deposit is confirmed on-chain, Anchorage Digital automatically initiates a new Deposit Attribution with a `PENDING` status. While in the `PENDING` status, funds are not available for movement or use for other purposes until the attribution process is complete. The attribution data is reviewed by Anchorage Digital, represented by the `UNDER_REVIEW` status. Upon successful completion of the review, the attribution status changes to `ATTRIBUTED`, making the funds available. If the review is unsuccessful, the status changes to `BLOCKED`.

      We do our best to automatically attribute deposits on behalf of our users, assuming the attribution for the specific address is known, but for those deposits where this is not possible, we enable the user to do so programmatically or via our Web Dashboard.

      Overall, these endpoints provide users with the capability to view, manage, and complete the deposit attribution process programmatically.
    name: Deposit Attribution
  - description: |
      An Anchorage Digital organization has one or more vaults. Each vault may contain one or more assets which are held in wallets. Each wallet may be comprised of one or more addresses depending on the type of the asset, i.e. UTXO-based assets and account-based assets.

      ### Balances

      Each asset in a vault has an `availableBalance` and a `totalBalance`. The `availableBalance` is the balance that is available to be withdrawn, held, or transferred. The `totalBalance` may contain funds that are held, in-progress, or locked for activities like voting.

      #### Vault IDs

      Each vault has an ID that is uniquely identifiable across the Anchorage Digital platform and can be used to reference this vault using the Anchorage Digital API. The vault ID is available as the `vaultId` field in the API response, or in the Vaults tab of the Anchorage Digital Web Dashboard.

      #### Allow API Access to a Vault

      By default, an Anchorage Digital vault does not allow API access. To allow programmatic management of addresses and transfers or read access to balances and transactions, create a [permission group](#section/Authentication-and-Security/Permission-Groups) with the desired permissions (read, transfer, etc.) for that vault. Any API key that is associated with this permission group will have API access to that vault.
    name: Vaults
  - description: |
      A vault has one or more wallets. Each wallet is a collection of one or more addresses depending on the asset type. A wallet is created for a particular blockchain network, e.g. Bitcoin, Ethereum, etc.

      ### Balances
      Depending on the blockchain network of the wallet, a wallet may hold one or more asset types. An asset in a wallet has an `availableBalance` and a `totalBalance`. The `availableBalance` is the balance that is available to be withdrawn, held, or transferred. The `totalBalance` may contain funds that are held, in-progress, or locked for activities like voting.

      ### Addresses
      A wallet is a collection of one or more addresses depending on the asset type. The `depositAddress` contains the last address to be provisioned to that wallet. For UTXO-based assets this address could change as new deposit addresses are provisioned. For account-based assets, this address will not change as only one address may be provisioned per wallet. To see all addresses for an asset, use the [Addresses endpoint](#tag/Addresses).

      ### Default Wallets
      Each asset type within a vault has a default wallet that is used for a particular asset when only the vault is specified. For example, a transfer between two vaults will take the asset from the default wallet for that asset in the sending vault and send it to the default wallet for that asset in the destination vault. Each wallet has a `isDefault` flag that indicates whether it is the default wallet.

      ### Maximum Allowed Wallets and Creation Constraints
      We have a constraint of 10,000 wallets per asset and defined a creation limit of 10 wallets per asset per 30 minutes interval. Theses contraints are imposed at the organization level.
    name: Wallets
  - description: |
      Transactions include all of the blockchain actions that affect your vault balances, such as withdrawals, deposits, transfers, and participation actions. Each transaction may have a corresponding blockchain transaction.

      Only transactions that are final will be returned. This includes all successful transactions as well as unsuccessful transactions where a blockchain fee was paid.

      Deposits, once confirmed on-chain, are subject to collection of originator data. Check the [Deposit Attribution](#tag/Deposit-Attribution) section for details.
    name: Transactions
  - description: These endpoints allow you to transfer assets from one of your API-enabled vaults to *another resource custodied by Anchorage Digital*.
    name: Transfers
  - description: |
      API endpoints for managing RFQ, Market or Limit orders

      [Anchorage Digital websocket API documentation.](https://anchorage-wsapi.netlify.app/)
    name: Trading
  - description: |
      Holds can be placed by an authorized partner on client assets to prevent withdrawal of those funds while they are being used for other purposes, such as trading.


      Holds are placed on a per-asset basis and may hold up to the entire balance of an asset. A hold may be indefinite or it may have an expiration date. Assets that are on hold cannot be withdrawn from their vault by the client. Holds may only be modified by the creator of the hold.


      For example, if a vault contains 200 BTC and an authorized partner places a hold on 50 BTC, the client's available balance becomes 150 BTC until the hold is executed or released. Additional holds could be placed on the remaining 150 BTC with different expiration dates.


      #### Execution

      A hold can be canceled or executed by the creator of the hold. If a hold is canceled or expires, the previously held funds will now be available to withdraw by the client.


      Executing a hold involves capturing some or all of the held funds and transferring them to the partner's Anchorage Digital vault. If a hold is partially executed, the remaining funds may either be released or continue to be held.

      Note that the amount withheld does not cover any network transaction fees required for transfers.

      #### Authorization

      A client can authorize a partner to place holds on their assets by creating an API key with hold and transfer permissions on specific vaults. The partner may generate and provide a public key at the time of key creation so that their private signing key remains secure.



      *NOTE: These endpoints are under active development and are subject to change.*
    name: Holds
  - description: |
      These endpoints allow clients/partner institutions to start the customer onboarding process for a B2B2B/B2B2C end customer who would not be using the Anchorage Digital applications directly. They collect the required data and documentation for Anchorage Digital to satisfy its regulatory obligations to perform KYB/KYC, CIP, CDD and EDD on its customers and related parties.

      Currently only B2B2B/B2B2C customer onboarding is supported.

      ### Payload Data
      The "customer" endpoints take a payload of `entries` in an array of key/value pairs. Details on the required and support key/value pairs is available in documentation provided by Anchorage Digital. Please contact your Customer Experience representative for details.

      Note that some of the keys are conditional depending on the presence or value of other key/value pairs. For example, the key `legalStructureOther` is only required if the `legalStructure` key has the Enum value `OTHER`.

      Also note that every `value` field accepts primitives, objects and collections, which makes the payload very flexible for the client's needs.
      For example, both of the following `entries` are accepted and interchangeable:

      ```json
      {
        "entries":[
          {
            "key":"boolField",
            "value":true
          },
          {
            "key":"numberField",
            "value":10
          },
          {
            "key":"stringField",
            "value":"stringFieldValue"
          },
          {
            "key":"collectionField",
            "value":[
              "collectionField0Value",
              "collectionField1Value"
            ]
          },
          {
            "key":"objectField",
            "value":{
              "field0":"field0Value",
              "field1":"field1Value",
              "field2":"field2Value"
            }
          },
          {
            "key":"objectCollectionField",
            "value":[
              {
                "field0":"field0AValue",
                "field1":"field1AValue",
                "field2":"field2AValue"
              },
              {
                "field0":"field0BValue",
                "field1":"field1BValue",
                "field2":"field2BValue"
              }
            ]
          }
        ]
      }
      ```

      ```json
      {
        "entries":[
          {
            "key":"boolField",
            "value":true
          },
          {
            "key":"numberField",
            "value":10
          },
          {
            "key":"stringField",
            "value":"stringFieldValue"
          },
          {
            "key":"collectionField.0",
            "value":"collectionField0Value"
          },
          {
            "key":"collectionField.1",
            "value":"collectionField1Value"
          },
          {
            "key":"objectField.field0",
            "value":"field0Value"
          },
          {
            "key":"objectField.field1",
            "value":"field1Value"
          },
          {
            "key":"objectField.field2",
            "value":"field2Value"
          },
          {
            "key":"objectCollectionField.0.field0",
            "value":"field0AValue"
          },
          {
            "key":"objectCollectionField.0.field1",
            "value":"field1AValue"
          },
          {
            "key":"objectCollectionField.0.field2",
            "value":"field2AValue"
          },
          {
            "key":"objectCollectionField.1.field0",
            "value":"field0BValue"
          },
          {
            "key":"objectCollectionField.1.field1",
            "value":"field1BValue"
          },
          {
            "key":"objectCollectionField.1.field2",
            "value":"field2BValue"
          }
        ]
      }
      ```
    name: Onboarding
  - description: |
      These endpoints allow creating, applying, removing, and searching tags on operations.
    name: Tagging
  - description: |
      These endpoints allow the organization to manage subaccounts.
    name: Subaccounts
  - description: |
      These endpoints allow access to vesting balance information for allocations.
    name: Vesting
  - description: |
      These endpoints allow the organization to manage tax.

      ** UNDER DEVELOPMENT **
    name: Tax
  - description: ''
    name: Collateral Management
  - description: ''
    name: Atlas Settlement Network
  - description: ''
    name: Webhook Notifications
  - description: ''
    name: Statements
  - description: ''
    name: Trusted Destinations
  - description: Endpoints for stablecoin conversion operations including issuance and redemption
    name: Stablecoins
  - description: Operations for managing tax accounts and cost basis reporting
    name: Tax Reporting
  - description: |
      <SchemaDefinition schemaRef="#/components/schemas/TransferDetails" showReadOnly={true} showWriteOnly={true} />
    name: Transfer Model
  - description: |
      <SchemaDefinition schemaRef="#/components/schemas/TransactionDetails" exampleRef="#/components/examples/TransactionDetailsWithdraw" showReadOnly={true} showWriteOnly={true} />
    name: Transaction Model
  - description: |
      <SchemaDefinition schemaRef="#/components/schemas/VaultDetails" showReadOnly={true} showWriteOnly={true} />
    name: Vault Model
  - description: |
      A Deposit Attribution represents the current state of the deposit attribution process.
      <SchemaDefinition schemaRef="#/components/schemas/DepositAttribution" showReadOnly={true} showWriteOnly={true} />
    name: Deposit Attribution Model
x-tagGroups:
  - name: Under Development
    tags:
      - Collateral Management
      - Holds
      - Deposit Attribution
      - Onboarding
      - Trusted Destinations
      - Atlas Settlement Network
      - Tax
  - name: API Endpoints
    tags:
      - Addresses
      - Asset Types
      - Transactions
      - Transfers
      - Wallets
      - Vaults
      - Vesting
      - Tagging
      - Subaccounts
      - Stablecoins
      - Webhook Notifications
      - API Key
      - Statements
      - Tax Reporting
      - Trading
  - name: Models
    tags:
      - Transfer Model
      - Transaction Model
      - Vault Model
      - Deposit Attribution Model
security:
  - Api-Access-Key: []
