openapi: 3.0.1
info:
  title: REST API
  description: |-
    # Welcome to Coinbase Exchange API
    ## Introduction
    The Exchange Trading APIs allow institutions to place orders and access account information. The following API pages detail various REST API endpoints we offer for lower-frequency trading and general requests.
    ## Getting Started
    To get started, please visit one of the following pages:
    - [Authentication](/exchange/docs/rest-auth)
    - [Rate Limits](/exchange/docs/rest-rate-limits)
    - [Pagination](/exchange/docs/rest-pagination)
    - [Status Codes](/exchange/docs/rest-requests)
    - [Quickstart](/exchange/docs/getting-started)
    ## FIX API
    - [FIX API reference](/exchange/docs/fix-connectivity)
    ## WebSocket API
    - [WebSocket API reference](/exchange/docs/websocket-overview)
  version: "1.0"
servers:
- url: https://api.exchange.coinbase.com/
security:
- ApiKeyAuthKey: []
  ApiKeyAuthPassphrase: []
  ApiKeyAuthSign: []
  ApiKeyAuthTimestamp: []
paths:
  /accounts:
    get:
      tags:
      - Accounts
      summary: Get all accounts for a profile
      description: Get a list of trading accounts from the profile of the API key.
      operationId: ExchangeRESTAPI_GetAccounts
      responses:
        "200":
          description: ""
          content:
            application/json:
              schema:
                type: array
                items:
                  $ref: '#/components/schemas/apiAccount'
        "401":
          description: Unauthorized.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/apiUnauthorizedResponse'
        "500":
          description: An unexpected error response.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/apiErrorResponse'
  /accounts/{account_id}:
    get:
      tags:
      - Accounts
      summary: Get a single account by id
      description: Information for a single account. Use this endpoint when you know
        the account_id. API key must belong to the same profile as the account.
      operationId: ExchangeRESTAPI_GetAccount
      parameters:
      - name: account_id
        in: path
        required: true
        schema:
          type: string
      responses:
        "200":
          description: ""
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/apiAccount'
        "401":
          description: Unauthorized.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/apiUnauthorizedResponse'
        "500":
          description: An unexpected error response.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/apiErrorResponse'
  /accounts/{account_id}/holds:
    get:
      tags:
      - Accounts
      summary: Get a single account's holds
      description: "List the holds of an account that belong to the same profile as\
        \ the API key. Holds are placed on an account for any active orders or pending\
        \ withdraw requests. As an order is filled, the hold amount is updated. If\
        \ an order is canceled, any remaining hold is removed. For withdrawals, the\
        \ hold is removed after it is completed."
      operationId: ExchangeRESTAPI_GetAccountHolds
      parameters:
      - name: account_id
        in: path
        required: true
        schema:
          type: string
      - name: before
        in: query
        description: Used for pagination. Sets start cursor to `before` date.
        schema:
          type: string
      - name: after
        in: query
        description: Used for pagination. Sets end cursor to `after` date.
        schema:
          type: string
      - name: limit
        in: query
        description: Limit on number of results to return.
        schema:
          type: integer
          format: int64
          default: 100
      responses:
        "200":
          description: ""
          content:
            application/json:
              schema:
                type: array
                items:
                  $ref: '#/components/schemas/apiAccountHold'
        "401":
          description: Unauthorized.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/apiUnauthorizedResponse'
        "500":
          description: An unexpected error response.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/apiErrorResponse'
  /accounts/{account_id}/ledger:
    get:
      tags:
      - Accounts
      summary: Get a single account's ledger
      description: "Lists ledger activity for an account. This includes anything that\
        \ would affect the accounts balance - transfers, trades, fees, etc."
      operationId: ExchangeRESTAPI_GetAccountLedger
      parameters:
      - name: account_id
        in: path
        description: Returns list of ledger entries from this account id.
        required: true
        schema:
          type: string
      - name: start_date
        in: query
        description: "Search by minimum posted date time and is inclusive of time\
          \ provided. Valid formats are either RFC3339, date or date time and must\
          \ be after Unix Epoch time."
        schema:
          type: string
      - name: end_date
        in: query
        description: "Search by maximum posted date time and is inclusive of time\
          \ provided. Valid formats are either RFC3339, date or date time and must\
          \ be after Unix Epoch time."
        schema:
          type: string
      - name: before
        in: query
        description: Used for pagination. Sets start cursor to `before` id.
        schema:
          type: string
      - name: after
        in: query
        description: Used for pagination. Sets end cursor to `after` id.
        schema:
          type: string
      - name: limit
        in: query
        description: Limit on number of results to return.
        schema:
          type: integer
          format: int64
          default: 100
      - name: profile_id
        in: query
        schema:
          type: string
      responses:
        "200":
          description: ""
          content:
            application/json:
              schema:
                type: array
                items:
                  $ref: '#/components/schemas/apiAccountLedgerEntry'
        "400":
          description: Bad request.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/apiErrorResponse'
        "401":
          description: Unauthorized.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/apiUnauthorizedResponse'
        "404":
          description: Not found.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/apiErrorResponse'
        "500":
          description: An unexpected error response.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/apiErrorResponse'
        "503":
          description: Service Unavailable.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/apiErrorResponse'
  /accounts/{account_id}/transfers:
    get:
      tags:
      - Accounts
      summary: Get a single account's transfers
      description: Lists past withdrawals and deposits for an account.
      operationId: ExchangeRESTAPI_GetAccountTransfers
      parameters:
      - name: account_id
        in: path
        description: Returns list of transfers from this account id.
        required: true
        schema:
          type: string
      - name: before
        in: query
        description: Used for pagination. Sets start cursor to `before` date.
        schema:
          type: string
      - name: after
        in: query
        description: Used for pagination. Sets end cursor to `after` date.
        schema:
          type: string
      - name: limit
        in: query
        description: Limit on number of results to return.
        schema:
          type: integer
          format: int64
          default: 100
      - name: type
        in: query
        schema:
          type: string
      responses:
        "200":
          description: ""
          content:
            application/json:
              schema:
                type: array
                items:
                  $ref: '#/components/schemas/apiTransfer'
        "401":
          description: Unauthorized.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/apiUnauthorizedResponse'
        "500":
          description: An unexpected error response.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/apiErrorResponse'
  /address-book:
    get:
      tags:
      - Address book
      summary: Get address book
      description: Get all addresses stored in the address book.
      operationId: ExchangeRESTAPI_GetAddressBook
      responses:
        "200":
          description: ""
          content:
            application/json:
              schema:
                type: array
                items:
                  $ref: '#/components/schemas/GetAddressBookResponseAddressInfo'
        "401":
          description: Unauthorized.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/apiUnauthorizedResponse'
        "500":
          description: An unexpected error response.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/apiErrorResponse'
    post:
      tags:
      - Address book
      summary: Add addresses
      description: Add new addresses to address book
      operationId: ExchangeRESTAPI_PostAddressBook
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/apiPublicPostAddressBookRequest'
        required: true
      responses:
        "200":
          description: A successful response.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/apiPostAddressBookResponse'
        "500":
          description: An unexpected error response.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/apiErrorResponse'
      x-codegen-request-body-name: body
  /address-book/counterparty:
    get:
      tags:
      - Address book
      summary: Get counterparty address book
      description: Get all counterparty addresses stored in the address book
      operationId: ExchangeRESTAPI_GetCounterpartyAddressBook
      responses:
        "200":
          description: ""
          content:
            application/json:
              schema:
                type: array
                items:
                  $ref: '#/components/schemas/apiCounterpartyAddress'
        "401":
          description: Unauthorized.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/apiUnauthorizedResponse'
        "500":
          description: An unexpected error response.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/apiErrorResponse'
  /address-book/{id}:
    put:
      tags:
      - Address book
      summary: Update address book
      description: Update an address book entry
      operationId: ExchangeRESTAPI_PutAddressBookEntry
      parameters:
      - name: id
        in: path
        required: true
        schema:
          type: string
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/apiPublicPutAddressBookEntryRequest'
        required: true
      responses:
        "200":
          description: ""
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/apiAddressBookWhitelistedAddress'
        "500":
          description: An unexpected error response.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/apiErrorResponse'
      x-codegen-request-body-name: body
    delete:
      tags:
      - Address book
      summary: Delete address
      description: Delete address from address book
      operationId: ExchangeRESTAPI_DeleteAddressBookEntry
      parameters:
      - name: id
        in: path
        description: Address book identifier
        required: true
        schema:
          type: string
      responses:
        "200":
          description: A successful response.
          content:
            application/json:
              schema:
                type: object
        "500":
          description: An unexpected error response.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/apiErrorResponse'
  /coinbase-accounts:
    get:
      tags:
      - Coinbase accounts
      summary: Get all Coinbase wallets
      description: Gets all the user's available Coinbase wallets (These are the wallets/accounts
        that are used for buying and selling on www.coinbase.com)
      operationId: ExchangeRESTAPI_GetCoinbaseAccounts
      responses:
        "200":
          description: ""
          content:
            application/json:
              schema:
                type: array
                items:
                  $ref: '#/components/schemas/apiCoinbaseAccount'
        "401":
          description: Unauthorized.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/apiUnauthorizedResponse'
        "500":
          description: An unexpected error response.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/apiErrorResponse'
  /coinbase-accounts/{account_id}/addresses:
    post:
      tags:
      - Coinbase accounts
      summary: Generate crypto address
      description: Generates a one-time crypto address for depositing crypto.
      operationId: ExchangeRESTAPI_PostCoinbaseAccountAddresses
      parameters:
      - name: account_id
        in: path
        required: true
        schema:
          type: string
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/apiPostCoinbaseAccountAddressesRequest'
        required: true
      responses:
        "200":
          description: ""
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/apiCoinbaseAccountGeneratedDepositAddress'
        "401":
          description: Unauthorized.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/apiUnauthorizedResponse'
        "500":
          description: An unexpected error response.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/apiErrorResponse'
      x-codegen-request-body-name: body
  /conversions:
    get:
      tags:
      - Conversions
      summary: Get all conversions
      description: Gets all currency conversions (i.e. USD -> USDC) for a given profile
      operationId: ExchangeRESTAPI_GetAllConversions
      parameters:
      - name: profile_id
        in: query
        schema:
          type: string
      - name: before
        in: query
        schema:
          type: string
      - name: after
        in: query
        schema:
          type: string
      - name: limit
        in: query
        schema:
          type: integer
          format: int64
      responses:
        "200":
          description: ""
          content:
            application/json:
              schema:
                type: array
                items:
                  $ref: '#/components/schemas/apiConversion'
        "500":
          description: An unexpected error response.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/apiErrorResponse'
    post:
      tags:
      - Conversions
      summary: Convert currency
      description: Converts funds from `from` currency to `to` currency. Funds are
        converted on the `from` account in the `profile_id` profile.
      operationId: ExchangeRESTAPI_PostConversion
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/apiPostConversionRequest'
        required: true
      responses:
        "200":
          description: ""
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/apiConversion'
        "401":
          description: Unauthorized.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/apiUnauthorizedResponse'
        "500":
          description: An unexpected error response.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/apiErrorResponse'
        "503":
          description: Service Unavailable.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/apiErrorResponse'
      x-codegen-request-body-name: body
  /conversions/fees:
    get:
      tags:
      - Conversions
      summary: Get conversion fee rates
      description: Gets a list of current conversion fee rates and trailing 30 day
        volume by currency pair
      operationId: ExchangeRESTAPI_GetConversionFees
      responses:
        "200":
          description: ""
          content:
            application/json:
              schema:
                type: array
                items:
                  $ref: '#/components/schemas/apiConversionFee'
        "500":
          description: An unexpected error response.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/apiErrorResponse'
  /conversions/{conversion_id}:
    get:
      tags:
      - Conversions
      summary: Get a conversion
      description: Gets a currency conversion by id (i.e. USD -> USDC).
      operationId: ExchangeRESTAPI_GetConversion
      parameters:
      - name: conversion_id
        in: path
        required: true
        schema:
          type: string
      - name: profile_id
        in: query
        schema:
          type: string
      responses:
        "200":
          description: ""
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/apiConversion'
        "401":
          description: Unauthorized.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/apiUnauthorizedResponse'
        "500":
          description: An unexpected error response.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/apiErrorResponse'
  /currencies:
    get:
      tags:
      - Currencies
      summary: Get all known currencies
      description: |-
        Gets a list of all known currencies.
         Note: Not all currencies may be currently in use for trading.
      operationId: ExchangeRESTAPI_GetCurrencies
      responses:
        "200":
          description: ""
          content:
            application/json:
              schema:
                type: array
                items:
                  $ref: '#/components/schemas/apiCurrency'
        "500":
          description: An unexpected error response.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/apiErrorResponse'
      security: []
  /currencies/{currency_id}:
    get:
      tags:
      - Currencies
      summary: Get a currency
      description: Gets a single currency by id.
      operationId: ExchangeRESTAPI_GetCurrency
      parameters:
      - name: currency_id
        in: path
        required: true
        schema:
          type: string
      responses:
        "200":
          description: ""
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/apiCurrency'
        "500":
          description: An unexpected error response.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/apiErrorResponse'
      security: []
  /deposits/coinbase-account:
    post:
      tags:
      - Transfers
      summary: Deposit from Coinbase account
      description: Deposits funds from a www.coinbase.com wallet to the specified
        `profile_id`.
      operationId: ExchangeRESTAPI_PostDepositCoinbaseAccount
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/apiPublicPostDepositCoinbaseAccountRequest'
        required: true
      responses:
        "200":
          description: A successful response.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/apiPostDepositCoinbaseAccountResponse'
        "401":
          description: Unauthorized.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/apiUnauthorizedResponse'
        "403":
          description: Forbidden.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/apiErrorResponse'
        "500":
          description: An unexpected error response.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/apiErrorResponse'
      x-codegen-request-body-name: body
  /deposits/payment-method:
    post:
      tags:
      - Transfers
      summary: Deposit from payment method
      description: Deposits funds from a linked external payment method to the specified
        `profile_id`.
      operationId: ExchangeRESTAPI_PostDepositPaymentMethod
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/apiPublicPostDepositPaymentMethodRequest'
        required: true
      responses:
        "200":
          description: A successful response.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/apiPostDepositPaymentMethodResponse'
        "401":
          description: Unauthorized.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/apiUnauthorizedResponse'
        "500":
          description: An unexpected error response.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/apiErrorResponse'
      x-codegen-request-body-name: body
  /fees:
    get:
      tags:
      - Fees
      summary: Get fees
      description: Get fees rates and 30 days trailing volume.
      operationId: ExchangeRESTAPI_GetFees
      responses:
        "200":
          description: ""
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/apiFees'
        "401":
          description: Unauthorized.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/apiUnauthorizedResponse'
        "500":
          description: An unexpected error response.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/apiErrorResponse'
  /fills:
    get:
      tags:
      - Orders
      summary: Get all fills
      description: Get a list of fills. A fill is a partial or complete match on a
        specific order.
      operationId: ExchangeRESTAPI_GetFills
      parameters:
      - name: order_id
        in: query
        description: limit to fills on a specific order. Either `order_id` or `product_id`
          is required.
        schema:
          type: string
      - name: product_id
        in: query
        description: limit to fills on a specific product. Either `order_id` or `product_id`
          is required.
        schema:
          type: string
      - name: limit
        in: query
        description: Limit on number of results to return.
        schema:
          type: integer
          format: int64
          default: 100
      - name: before
        in: query
        description: Used for pagination. Sets start cursor to `before` id.
        schema:
          type: string
      - name: after
        in: query
        description: Used for pagination. Sets end cursor to `after` id.
        schema:
          type: string
      - name: market_type
        in: query
        description: Market type which the order was filled in.
        schema:
          type: string
          default: spot
          enum:
          - spot
          - rfq
      - name: start_date
        in: query
        description: "Search by minimum posted date time and is inclusive of time\
          \ provided. Valid formats are either RFC3339, date or date time and must\
          \ be after Unix Epoch time."
        schema:
          type: string
      - name: end_date
        in: query
        description: "Search by maximum posted date time and is inclusive of time\
          \ provided. Valid formats are either RFC3339, date or date time and must\
          \ be after Unix Epoch time."
        schema:
          type: string
      responses:
        "200":
          description: ""
          content:
            application/json:
              schema:
                type: array
                items:
                  $ref: '#/components/schemas/apiOrderFill'
        "401":
          description: Unauthorized.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/apiUnauthorizedResponse'
        "500":
          description: An unexpected error response.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/apiErrorResponse'
  /loans:
    get:
      tags:
      - Loans
      summary: List loans
      description: "Accepts zero or more loan IDs as input. If no loan IDs are specified,\
        \ it returns all loans for the user. Otherwise it returns only the loan IDs\
        \ specified."
      operationId: ExchangeRESTAPI_GetLoans
      parameters:
      - name: ids
        in: query
        schema:
          type: string
      responses:
        "200":
          description: ""
          content:
            application/json:
              schema:
                type: array
                items:
                  $ref: '#/components/schemas/apiLoan'
        "500":
          description: An unexpected error response.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/apiErrorResponse'
  /loans/assets:
    get:
      tags:
      - Loans
      summary: List loan assets
      description: "Get a list of lendable assets, a map of assets we accept as collateral\
        \ for loans, and the haircut weight."
      operationId: ExchangeRESTAPI_GetLoanAssets
      responses:
        "200":
          description: A successful response.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/apiGetLoanAssetsResponse'
        "500":
          description: An unexpected error response.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/apiErrorResponse'
  /loans/interest:
    get:
      tags:
      - Loans
      summary: List interest summaries
      description: List summaries of interest owed by asset
      operationId: ExchangeRESTAPI_GetInterestSummary
      responses:
        "200":
          description: ""
          content:
            application/json:
              schema:
                type: array
                items:
                  $ref: '#/components/schemas/apiInterestSummary'
        "500":
          description: An unexpected error response.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/apiErrorResponse'
  /loans/interest/history/{loan_id}:
    get:
      tags:
      - Loans
      summary: List interest rate history
      description: List interest rate history for a loan
      operationId: ExchangeRESTAPI_GetInterestHistory
      parameters:
      - name: loan_id
        in: path
        required: true
        schema:
          type: string
      responses:
        "200":
          description: ""
          content:
            application/json:
              schema:
                type: array
                items:
                  $ref: '#/components/schemas/apiInterestRate'
        "500":
          description: An unexpected error response.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/apiErrorResponse'
  /loans/interest/{loan_id}:
    get:
      tags:
      - Loans
      summary: List interest charges
      description: List interest charges for a loan
      operationId: ExchangeRESTAPI_GetInterestCharges
      parameters:
      - name: loan_id
        in: path
        required: true
        schema:
          type: string
      responses:
        "200":
          description: ""
          content:
            application/json:
              schema:
                type: array
                items:
                  $ref: '#/components/schemas/apiInterestCharge'
        "500":
          description: An unexpected error response.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/apiErrorResponse'
  /loans/lending-overview:
    get:
      tags:
      - Loans
      summary: Get lending overview
      description: "This API summarizes lending for a given client. It calculates\
        \ the overall loan balance, collateral level, and amounts available to borrow.\
        \ It also returns any withdrawal restrictions in force on the client."
      operationId: ExchangeRESTAPI_GetLoanLendingOverview
      responses:
        "200":
          description: ""
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/apiLendingOverviewResult'
        "500":
          description: An unexpected error response.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/apiErrorResponse'
  /loans/loan-preview:
    get:
      tags:
      - Loans
      summary: Get new loan preview
      description: "This API is similar to lending-overview but is used to preview\
        \ the results of opening a new loan. The values returned in the preview response\
        \ take the existing loans, collateral and the potential change being previewed\
        \ into account. Note the preview request accepts native currency amounts as\
        \ input."
      operationId: ExchangeRESTAPI_GetLoanPreview
      parameters:
      - name: currency
        in: query
        schema:
          type: string
      - name: native_amount
        in: query
        schema:
          type: string
      responses:
        "200":
          description: A successful response.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/apiGetPreviewResponse'
        "500":
          description: An unexpected error response.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/apiErrorResponse'
  /loans/open:
    post:
      tags:
      - Loans
      summary: Open new loan
      description: "This API triggers a loan open request. Funding is not necessarily\
        \ instantaneous and there is no SLA. You are notified when funds have settled\
        \ in your Exchange account. Loan open requests, once initiated, cannot be\
        \ canceled."
      operationId: ExchangeRESTAPI_OpenLoan
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/apiOpenLoanRequest'
        required: true
      responses:
        "200":
          description: A successful response.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/apiOpenLoanResponse'
        "500":
          description: An unexpected error response.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/apiErrorResponse'
      x-codegen-request-body-name: body
  /loans/options:
    get:
      tags:
      - Loans
      summary: List new loan options
      description: "Get available currencies and interest rates for new loans. All\
        \ amounts returned by this API are notional values (i.e., USD)."
      operationId: ExchangeRESTAPI_GetNewLoanOptions
      responses:
        "200":
          description: ""
          content:
            application/json:
              schema:
                type: array
                items:
                  $ref: '#/components/schemas/apiNewLoanOption'
        "500":
          description: An unexpected error response.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/apiErrorResponse'
  /loans/repay-interest:
    post:
      tags:
      - Loans
      summary: Repay loan interest
      description: Submit an interest repayment for a loan.
      operationId: ExchangeRESTAPI_RepayInterest
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/apiRepayInterestRequest'
        required: true
      responses:
        "200":
          description: A successful response.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/apiRepayInterestResponse'
        "500":
          description: An unexpected error response.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/apiErrorResponse'
      x-codegen-request-body-name: body
  /loans/repay-principal:
    post:
      tags:
      - Loans
      summary: Repay loan principal
      description: Submit a principal repayment for a loan.
      operationId: ExchangeRESTAPI_RepayPrincipal
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/apiRepayPrincipalRequest'
        required: true
      responses:
        "200":
          description: A successful response.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/apiRepayPrincipalResponse'
        "500":
          description: An unexpected error response.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/apiErrorResponse'
      x-codegen-request-body-name: body
  /loans/repayment-preview:
    get:
      tags:
      - Loans
      summary: Get principal repayment preview
      description: Preview the results of a loan principal repayment.
      operationId: ExchangeRESTAPI_GetRepaymentPreview
      parameters:
      - name: loan_id
        in: query
        schema:
          type: string
      - name: currency
        in: query
        schema:
          type: string
      - name: native_amount
        in: query
        schema:
          type: string
      responses:
        "200":
          description: A successful response.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/apiGetPreviewResponse'
        "500":
          description: An unexpected error response.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/apiErrorResponse'
  /loans/lending-overview-xm:
    get:
      tags:
      - Loans
      summary: Get lending overview XM
      description: Get lending overview for a cross margin user with margin requirements and account equity information.
      operationId: ExchangeRESTAPI_GetLoanLendingOverviewXM
      parameters:
      - name: user_id
        in: query
        description: Optional, user in admin auth
        schema:
          type: string
      responses:
        "200":
          description: A successful response.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/apiGetLoanLendingOverviewXMResponse'
        "401":
          description: Unauthorized.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/apiUnauthorizedResponse'
        "500":
          description: An unexpected error response.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/apiErrorResponse'
  /loans/loan-preview-xm:
    get:
      tags:
      - Loans
      summary: Get loan preview XM
      description: Preview the results of a loan for a cross margin user.
      operationId: ExchangeRESTAPI_GetLoanPreviewXM
      parameters:
      - name: currency
        in: query
        required: true
        schema:
          type: string
      - name: native_amount
        in: query
        required: true
        schema:
          type: string
      responses:
        "200":
          description: A successful response.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/apiGetPreviewXMResponse'
        "401":
          description: Unauthorized.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/apiUnauthorizedResponse'
        "500":
          description: An unexpected error response.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/apiErrorResponse'
  /loans/repayment-preview-xm:
    get:
      tags:
      - Loans
      summary: Get repayment preview XM
      description: Preview the results of a loan principal repayment for a cross margin user.
      operationId: ExchangeRESTAPI_GetRepaymentPreviewXM
      parameters:
      - name: loan_id
        in: query
        required: true
        schema:
          type: string
      - name: currency
        in: query
        required: true
        schema:
          type: string
      - name: native_amount
        in: query
        required: true
        schema:
          type: string
      responses:
        "200":
          description: A successful response.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/apiGetPreviewXMResponse'
        "401":
          description: Unauthorized.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/apiUnauthorizedResponse'
        "500":
          description: An unexpected error response.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/apiErrorResponse'
  /margin/auto-loan:
    get:
      tags:
      - Futures
      summary: Get auto loan setting
      description: Get the setting to automatically initiate loans to meet margin
        calls with Coinbase affiliates in accordance with the Lending Agreement and
        Side Letter
      operationId: ExchangeRESTAPI_GetFcmAutoLoan
      responses:
        "200":
          description: A successful response.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/apiGetFcmAutoLoanResponse'
        "500":
          description: An unexpected error response.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/apiErrorResponse'
    post:
      tags:
      - Futures
      summary: Set auto loan
      description: Automatically initiate loans to meet margin calls with Coinbase
        affiliates in accordance with the Lending Agreement and Side Letter
      operationId: ExchangeRESTAPI_PostFcmAutoLoan
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/apiPostFcmAutoLoanRequest'
        required: true
      responses:
        "200":
          description: A successful response.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/apiPostFcmAutoLoanResponse'
        "500":
          description: An unexpected error response.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/apiErrorResponse'
      x-codegen-request-body-name: body
  /margin/usdc:
    get:
      tags:
      - Futures
      summary: Get USDC conversion
      description: Get the USDC to USD auto conversion setting to meet margin calls
        with eligible Coinbase Affiliate
      operationId: ExchangeRESTAPI_GetFcmUsdcMargin
      responses:
        "200":
          description: A successful response.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/apiGetFcmUsdcMarginResponse'
        "500":
          description: An unexpected error response.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/apiErrorResponse'
    post:
      tags:
      - Futures
      summary: Set USDC conversion
      description: Set the USDC to USD auto conversion to meet margin calls with eligible
        Coinbase Affiliate
      operationId: ExchangeRESTAPI_PostFcmUsdcMargin
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/apiPostFcmUsdcMarginRequest'
        required: true
      responses:
        "200":
          description: A successful response.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/apiPostFcmUsdcMarginResponse'
        "500":
          description: An unexpected error response.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/apiErrorResponse'
      x-codegen-request-body-name: body
  /orders:
    get:
      tags:
      - Orders
      summary: Get all orders
      description: "List your current open orders. Only open or un-settled orders\
        \ are returned by default. As soon as an order is no longer open and settled,\
        \ it will no longer appear in the default request. Open orders may change\
        \ state between the request and the response depending on market conditions."
      operationId: ExchangeRESTAPI_GetOrders
      parameters:
      - name: profile_id
        in: query
        description: Filter results by a specific profile_id
        schema:
          type: string
      - name: product_id
        in: query
        description: Filter results by a specific product_id
        schema:
          type: string
      - name: sortedBy
        in: query
        description: Sort criteria for results.
        schema:
          type: string
          default: created_at
          enum:
          - created_at
          - price
          - size
          - order_id
          - side
          - type
      - name: sorting
        in: query
        description: "Ascending or descending order, by `sortedBy`"
        schema:
          type: string
          default: desc
          enum:
          - desc
          - asc
      - name: start_date
        in: query
        description: Filter results by minimum posted date
        schema:
          type: string
          format: date-time
      - name: end_date
        in: query
        description: Filter results by maximum posted date
        schema:
          type: string
          format: date-time
      - name: before
        in: query
        description: Used for pagination. Sets start cursor to `before` date.
        schema:
          type: string
      - name: after
        in: query
        description: Used for pagination. Sets end cursor to `after` date.
        schema:
          type: string
      - name: limit
        in: query
        description: Limit on number of results to return.
        required: true
        schema:
          type: integer
          format: int64
          default: 100
      - name: status
        in: query
        description: Array with order statuses to filter by.
        required: true
        style: form
        explode: true
        schema:
          type: array
          items:
            type: string
            enum:
            - open
            - pending
            - rejected
            - done
            - active
            - received
            - all
      - name: market_type
        in: query
        description: Market type which the order was traded in.
        schema:
          type: string
          default: spot
      responses:
        "200":
          description: ""
          content:
            application/json:
              schema:
                type: array
                items:
                  $ref: '#/components/schemas/apiOrder'
        "401":
          description: Unauthorized.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/apiUnauthorizedResponse'
        "500":
          description: An unexpected error response.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/apiErrorResponse'
    post:
      tags:
      - Orders
      summary: Create a new order
      description: "Create an order. You can place two types of orders: limit and\
        \ market. Orders can only be placed if your account has sufficient funds.\
        \ Once an order is placed, your account funds will be put on hold for the\
        \ duration of the order. How much and which funds are put on hold depends\
        \ on the order type and parameters specified."
      operationId: ExchangeRESTAPI_PostOrders
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/apiPostOrdersRequest'
        required: true
      responses:
        "200":
          description: The new order that was successfully created
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/apiOrder'
        "401":
          description: Unauthorized.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/apiUnauthorizedResponse'
        "500":
          description: An unexpected error response.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/apiErrorResponse'
      x-codegen-request-body-name: body
    delete:
      tags:
      - Orders
      summary: Cancel all orders
      description: "With best effort, cancel all open orders. This may require you\
        \ to make the request multiple times until all of the open orders are deleted."
      operationId: ExchangeRESTAPI_DeleteOrders
      parameters:
      - name: profile_id
        in: query
        description: Cancels orders on a specific profile
        schema:
          type: string
      - name: product_id
        in: query
        description: Cancels orders on a specific product only
        schema:
          type: string
      responses:
        "200":
          description: A list of the `id`s of open orders that were successfully cancelled
          content:
            application/json:
              schema:
                type: array
                description: A list of the `id`s of open orders that were successfully
                  cancelled
                items:
                  type: string
        "401":
          description: Unauthorized.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/apiUnauthorizedResponse'
        "500":
          description: An unexpected error response.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/apiErrorResponse'
  /orders/{order_id}:
    get:
      tags:
      - Orders
      summary: Get single order
      description: Get a single order by `id`.
      operationId: ExchangeRESTAPI_GetOrder
      parameters:
      - name: order_id
        in: path
        description: "`order_id` is either the exchange assigned id or the client\
          \ assigned client_oid. When using client_oid it must be preceded by the\
          \ client: namespace."
        required: true
        schema:
          type: string
      - name: market_type
        in: query
        description: Market type which the order was traded in.
        schema:
          type: string
          default: spot
      responses:
        "200":
          description: ""
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/apiOrder'
        "401":
          description: Unauthorized.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/apiUnauthorizedResponse'
        "500":
          description: An unexpected error response.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/apiErrorResponse'
    delete:
      tags:
      - Orders
      summary: Cancel an order
      description: "Cancel a single open order by `{id}`."
      operationId: ExchangeRESTAPI_DeleteOrder
      parameters:
      - name: order_id
        in: path
        description: Orders may be canceled using either the exchange assigned id
          or the client assigned client_oid. When using client_oid it must be preceded
          by the `client:` namespace.
        required: true
        schema:
          type: string
      - name: profile_id
        in: query
        description: Cancels orders on a specific profile
        schema:
          type: string
      - name: product_id
        in: query
        description: Optional product id of order
        schema:
          type: string
      responses:
        "200":
          description: the `id` of the order that was cancelled`
          content:
            application/json:
              schema:
                type: string
                description: the `id` of the order that was cancelled`
        "401":
          description: Unauthorized.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/apiUnauthorizedResponse'
        "500":
          description: An unexpected error response.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/apiErrorResponse'
  /payment-methods:
    get:
      tags:
      - Transfers
      summary: Get all payment methods
      description: Gets a list of the user's linked payment methods.
      operationId: ExchangeRESTAPI_GetPaymentMethods
      responses:
        "200":
          description: ""
          content:
            application/json:
              schema:
                type: array
                items:
                  $ref: '#/components/schemas/apiPaymentMethod'
        "401":
          description: Unauthorized.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/apiUnauthorizedResponse'
        "500":
          description: An unexpected error response.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/apiErrorResponse'
  /products:
    get:
      tags:
      - Products
      summary: Get all known trading pairs
      description: Gets a list of available currency pairs for trading.
      operationId: ExchangeRESTAPI_GetProducts
      parameters:
      - name: type
        in: query
        schema:
          type: string
      responses:
        "200":
          description: ""
          content:
            application/json:
              schema:
                type: array
                items:
                  $ref: '#/components/schemas/apiProduct'
        "500":
          description: An unexpected error response.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/apiErrorResponse'
      security: []
  /products/volume-summary:
    get:
      tags:
      - Products
      summary: Get all product volume
      description: Gets 30day and 24hour volume for all products and market types
      operationId: ExchangeRESTAPI_GetProductsVolume
      responses:
        "200":
          description: ""
          content:
            application/json:
              schema:
                type: array
                items:
                  $ref: '#/components/schemas/apiProductVolume'
        "500":
          description: An unexpected error response.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/apiErrorResponse'
      security: []
  /products/{product_id}:
    get:
      tags:
      - Products
      summary: Get single product
      description: Get information on a single product.
      operationId: ExchangeRESTAPI_GetProduct
      parameters:
      - name: product_id
        in: path
        required: true
        schema:
          type: string
      responses:
        "200":
          description: ""
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/apiProduct'
        "500":
          description: An unexpected error response.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/apiErrorResponse'
      security: []
  /products/{product_id}/book:
    get:
      tags:
      - Products
      summary: Get product book
      description: Get a list of open orders for a product. The amount of detail shown
        can be customized with the `level` parameter.
      operationId: ExchangeRESTAPI_GetProductBook
      parameters:
      - name: product_id
        in: path
        required: true
        schema:
          type: string
      - name: level
        in: query
        schema:
          type: integer
          format: int32
          default: 1
      responses:
        "200":
          description: ""
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/apiProductBook'
        "500":
          description: An unexpected error response.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/apiErrorResponse'
      security: []
  /products/{product_id}/candles:
    get:
      tags:
      - Products
      summary: Get product candles
      description: "Historic rates for a product. Rates are returned in grouped buckets.\
        \ Candle schema is of the form `[timestamp, price_low, price_high, price_open,\
        \ price_close]`"
      operationId: ExchangeRESTAPI_GetProductCandles
      parameters:
      - name: product_id
        in: path
        required: true
        schema:
          type: string
      - name: granularity
        in: query
        schema:
          type: string
      - name: start
        in: query
        description: Timestamp for starting range of aggregations
        schema:
          type: string
      - name: end
        in: query
        description: Timestamp for ending range of aggregations
        schema:
          type: string
      responses:
        "200":
          description: ""
          content:
            application/json:
              schema:
                type: array
                items:
                  type: object
                  properties: {}
        "500":
          description: An unexpected error response.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/apiErrorResponse'
      security: []
  /products/{product_id}/stats:
    get:
      tags:
      - Products
      summary: Get product stats
      description: Gets 30day and 24hour stats for a product.
      operationId: ExchangeRESTAPI_GetProductStats
      parameters:
      - name: product_id
        in: path
        required: true
        schema:
          type: string
      responses:
        "200":
          description: ""
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/apiProductStats'
        "500":
          description: An unexpected error response.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/apiErrorResponse'
      security: []
  /products/{product_id}/ticker:
    get:
      tags:
      - Products
      summary: Get product ticker
      description: "Gets snapshot information about the last trade (tick), best bid/ask\
        \ and 24h volume."
      operationId: ExchangeRESTAPI_GetProductTicker
      parameters:
      - name: product_id
        in: path
        required: true
        schema:
          type: string
      responses:
        "200":
          description: ""
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/apiProductTicker'
        "500":
          description: An unexpected error response.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/apiErrorResponse'
      security: []
  /products/{product_id}/trades:
    get:
      tags:
      - Products
      summary: Get product trades
      description: Gets a list the latest trades for a product.
      operationId: ExchangeRESTAPI_GetProductTrades
      parameters:
      - name: product_id
        in: path
        description: list trades for specific product.
        required: true
        schema:
          type: string
      - name: limit
        in: query
        description: Limit on number of results to return.
        schema:
          type: integer
          format: int64
          default: 1000
      - name: before
        in: query
        description: Used for pagination. Sets start cursor to `before` id.
        schema:
          type: string
      - name: after
        in: query
        description: Used for pagination. Sets end cursor to `after` id.
        schema:
          type: string
      responses:
        "200":
          description: ""
          content:
            application/json:
              schema:
                type: array
                items:
                  $ref: '#/components/schemas/apiProductTrade'
        "500":
          description: An unexpected error response.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/apiErrorResponse'
      security: []
  /profiles:
    get:
      tags:
      - Profiles
      summary: Get profiles
      description: Gets a list of all of the current user's profiles.
      operationId: ExchangeRESTAPI_GetProfiles
      parameters:
      - name: active
        in: query
        schema:
          type: boolean
      responses:
        "200":
          description: ""
          content:
            application/json:
              schema:
                type: array
                items:
                  $ref: '#/components/schemas/apiProfile'
        "401":
          description: Unauthorized.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/apiUnauthorizedResponse'
        "500":
          description: An unexpected error response.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/apiErrorResponse'
    post:
      tags:
      - Profiles
      summary: Create a profile
      description: Create a new profile. Will fail if no name is provided or if user
        already has max number of profiles.
      operationId: ExchangeRESTAPI_PostProfile
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/apiPostProfileRequest'
        required: true
      responses:
        "200":
          description: ""
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/apiProfile'
        "401":
          description: Unauthorized.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/apiUnauthorizedResponse'
        "500":
          description: An unexpected error response.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/apiErrorResponse'
      x-codegen-request-body-name: body
  /profiles/transfer:
    post:
      tags:
      - Profiles
      summary: Transfer funds between profiles
      description: Transfer an amount of currency from one profile to another.
      operationId: ExchangeRESTAPI_PostProfileTransfer
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/apiPostProfileTransferRequest'
        required: true
      responses:
        "200":
          description: A successful response.
          content:
            application/json:
              schema:
                type: object
        "401":
          description: Unauthorized.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/apiUnauthorizedResponse'
        "500":
          description: An unexpected error response.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/apiErrorResponse'
      x-codegen-request-body-name: body
  /profiles/{profile_id}:
    get:
      tags:
      - Profiles
      summary: Get profile by id
      description: Information for a single profile. Use this endpoint when you know
        the profile_id.
      operationId: ExchangeRESTAPI_GetProfile
      parameters:
      - name: profile_id
        in: path
        required: true
        schema:
          type: string
      - name: active
        in: query
        schema:
          type: boolean
      responses:
        "200":
          description: ""
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/apiProfile'
        "401":
          description: Unauthorized.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/apiUnauthorizedResponse'
        "500":
          description: An unexpected error response.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/apiErrorResponse'
    put:
      tags:
      - Profiles
      summary: Rename a profile
      description: Rename a profile. Names 'default' and 'margin' are reserved.
      operationId: ExchangeRESTAPI_PutProfile
      parameters:
      - name: profile_id
        in: path
        required: true
        schema:
          type: string
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/apiPutProfileRequest'
        required: true
      responses:
        "200":
          description: ""
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/apiProfile'
        "401":
          description: Unauthorized.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/apiUnauthorizedResponse'
        "500":
          description: An unexpected error response.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/apiErrorResponse'
      x-codegen-request-body-name: body
  /profiles/{profile_id}/deactivate:
    put:
      tags:
      - Profiles
      summary: Delete a profile
      description: Deletes the profile specified by `profile_id` and transfers all
        funds to the profile specified by `to`. Fails if there are any open orders
        on the profile to be deleted.
      operationId: ExchangeRESTAPI_PutProfileDeactivate
      parameters:
      - name: profile_id
        in: path
        required: true
        schema:
          type: string
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/apiPutProfileDeactivateRequest'
        required: true
      responses:
        "200":
          description: A successful response.
          content:
            application/json:
              schema:
                type: object
        "401":
          description: Unauthorized.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/apiUnauthorizedResponse'
        "500":
          description: An unexpected error response.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/apiErrorResponse'
      x-codegen-request-body-name: body
  /reports:
    get:
      tags:
      - Reports
      summary: Get all reports
      description: Gets a list of all user generated reports.
      operationId: ExchangeRESTAPI_GetReports
      parameters:
      - name: profile_id
        in: query
        description: Filter results by a specific profile_id
        schema:
          type: string
      - name: after
        in: query
        description: Filter results after a specific date
        schema:
          type: string
          format: date-time
      - name: limit
        in: query
        description: Limit results to a specific number
        schema:
          type: integer
          format: int64
          default: 100
      - name: type
        in: query
        description: "Filter results by type of report. Possible values: [`account`,\
          \ `balance`, `fills`, `otc-fills`, `rfq-fills`, `tax-invoice`, `1099k-transaction-history`]"
        schema:
          type: string
      - name: ignore_expired
        in: query
        description: Ignore expired results
        schema:
          type: boolean
      responses:
        "200":
          description: ""
          content:
            application/json:
              schema:
                type: array
                items:
                  $ref: '#/components/schemas/apiReport'
        "401":
          description: Unauthorized.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/apiUnauthorizedResponse'
        "500":
          description: An unexpected error response.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/apiErrorResponse'
    post:
      tags:
      - Reports
      summary: Create a report
      description: "Generates a report. You can create reports with historical data\
        \ for all report types. [Balance reports](#balance-reports) can be snapshots\
        \ of historical or current data."
      operationId: ExchangeRESTAPI_PostReports
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/apiPostReportsRequest'
        required: true
      responses:
        "200":
          description: ""
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/apiReportCreateResult'
        "401":
          description: Unauthorized.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/apiUnauthorizedResponse'
        "500":
          description: An unexpected error response.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/apiErrorResponse'
      x-codegen-request-body-name: body
  /reports/{report_id}:
    get:
      tags:
      - Reports
      summary: Get a report
      description: Get a specific report by `report_id`.
      operationId: ExchangeRESTAPI_GetReport
      parameters:
      - name: report_id
        in: path
        required: true
        schema:
          type: string
      responses:
        "200":
          description: ""
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/apiReport'
        "401":
          description: Unauthorized.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/apiUnauthorizedResponse'
        "500":
          description: An unexpected error response.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/apiErrorResponse'
  /transfers:
    get:
      tags:
      - Transfers
      summary: Get all transfers
      description: Gets a list of in-progress and completed transfers of funds in/out
        of any of the user's accounts.
      operationId: ExchangeRESTAPI_GetTransfers
      parameters:
      - name: profile_id
        in: query
        description: Returns list of transfers from this portfolio id.
        schema:
          type: string
      - name: before
        in: query
        description: Used for pagination. Sets start cursor to `before` date.
        schema:
          type: string
      - name: after
        in: query
        description: Used for pagination. Sets end cursor to `after` date.
        schema:
          type: string
      - name: limit
        in: query
        description: Limit on number of results to return.
        schema:
          type: integer
          format: int64
          default: 30
      - name: type
        in: query
        description: Filter results by a specific transfer type. Internal transfer
          types represent transfers made between the user's profiles. Internal transfer
          types are excluded from the response when this field is not set
        schema:
          type: string
          default: deposit
          enum:
          - deposit
          - withdraw
          - internal_deposit
          - internal_withdraw
      - name: currency_type
        in: query
        description: "Filter results by type of currency. Possible values: [`crypto`,\
          \ `fiat`]"
        schema:
          type: string
      - name: transfer_reason
        in: query
        description: "Filter results by reason of transfer. Possible values: [`usdc_reward`]"
        schema:
          type: string
      - name: currency
        in: query
        description: Filter results by currency.
        schema:
          type: string
      responses:
        "200":
          description: ""
          content:
            application/json:
              schema:
                type: array
                items:
                  $ref: '#/components/schemas/apiTransfer'
        "401":
          description: Unauthorized.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/apiUnauthorizedResponse'
        "500":
          description: An unexpected error response.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/apiErrorResponse'
  /transfers/{transfer_id}:
    get:
      tags:
      - Transfers
      summary: Get a single transfer
      description: Get information on a single transfer.
      operationId: ExchangeRESTAPI_GetTransfer
      parameters:
      - name: transfer_id
        in: path
        required: true
        schema:
          type: string
      responses:
        "200":
          description: ""
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/apiTransfer'
        "401":
          description: Unauthorized.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/apiUnauthorizedResponse'
        "500":
          description: An unexpected error response.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/apiErrorResponse'
  /transfers/{transfer_id}/travel-rules:
    post:
      tags:
      - Transfers
      summary: Submit travel information for a transfer
      description: Submit travel information for a transfer
      operationId: ExchangeRESTAPI_PostTransferTravelRule
      parameters:
      - name: transfer_id
        in: path
        required: true
        schema:
          type: string
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/apiPostTransferTravelRuleRequest'
        required: true
      responses:
        "200":
          description: A successful response.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/apiPostTransferTravelRuleResponse'
        "401":
          description: Unauthorized.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/apiUnauthorizedResponse'
        "500":
          description: An unexpected error response.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/apiErrorResponse'
      x-codegen-request-body-name: body
  /travel-rules:
    get:
      tags:
      - Travel Rules
      summary: Get all travel rule information
      description: Return a list of all stored travel rule information
      operationId: ExchangeRESTAPI_GetTravelRules
      parameters:
      - name: before
        in: query
        description: Used for pagination. Sets start cursor to `before` id.
        schema:
          type: string
      - name: after
        in: query
        description: Used for pagination. Sets end cursor to `after` id.
        schema:
          type: string
      - name: limit
        in: query
        description: Limit on number of results to return.
        schema:
          type: integer
          format: int64
          default: 1000
      - name: address
        in: query
        description: Optional filter by address
        schema:
          type: string
      responses:
        "200":
          description: ""
          content:
            application/json:
              schema:
                type: array
                items:
                  $ref: '#/components/schemas/apiTravelRulePii'
        "401":
          description: Unauthorized.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/apiUnauthorizedResponse'
        "500":
          description: An unexpected error response.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/apiErrorResponse'
    post:
      tags:
      - Travel Rules
      summary: Create travel rule entry
      description: Create travel rule entry for sending address
      operationId: ExchangeRESTAPI_PostTravelRule
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/apiPostTravelRuleRequest'
        required: true
      responses:
        "200":
          description: ""
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/apiTravelRulePii'
        "401":
          description: Unauthorized.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/apiUnauthorizedResponse'
        "500":
          description: An unexpected error response.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/apiErrorResponse'
      x-codegen-request-body-name: body
  /travel-rules/{id}:
    delete:
      tags:
      - Travel Rules
      summary: Delete existing travel rule entry
      description: Delete existing travel rule entry
      operationId: ExchangeRESTAPI_DeleteTravelRule
      parameters:
      - name: id
        in: path
        description: Travel rule identifier
        required: true
        schema:
          type: string
      responses:
        "200":
          description: A successful response.
          content:
            application/json:
              schema:
                type: object
        "401":
          description: Unauthorized.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/apiUnauthorizedResponse'
        "500":
          description: An unexpected error response.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/apiErrorResponse'
  /users/{user_id}/exchange-limits:
    get:
      tags:
      - Users
      summary: Get user exchange limits
      description: Gets exchange limits information for a single user.
      operationId: ExchangeRESTAPI_GetUserExchangeLimits
      parameters:
      - name: user_id
        in: path
        required: true
        schema:
          type: string
      responses:
        "200":
          description: ""
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/apiUserExchangeTransferLimits'
        "401":
          description: Unauthorized.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/apiUnauthorizedResponse'
        "500":
          description: An unexpected error response.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/apiErrorResponse'
  /users/{user_id}/settlement-preferences:
    post:
      tags:
      - Users
      summary: Update settlement preference
      description: Updates the settlement preference to hold funds in either USDC
        or USD.
      operationId: ExchangeRESTAPI_PostUserLevelSettlementPreferences
      parameters:
      - name: user_id
        in: path
        description: The ID of the user who owns the account
        required: true
        schema:
          type: string
          default: self
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/apiPostUserLevelSettlementPreferenceRequest'
        required: true
      responses:
        "200":
          description: ""
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/apiUserLevelSettlementPreference'
        "401":
          description: Unauthorized.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/apiUnauthorizedResponse'
        "500":
          description: An unexpected error response.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/apiErrorResponse'
        "503":
          description: Service Unavailable.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/apiErrorResponse'
      x-codegen-request-body-name: body
  /users/{user_id}/trading-volumes:
    get:
      tags:
      - Users
      summary: Get user trading volume
      description: Gets aggregated and individual trading volumes for users.
      operationId: ExchangeRESTAPI_GetUserTradingVolumes
      parameters:
      - name: user_id
        in: path
        description: The ID of the user who owns the account
        required: true
        schema:
          type: string
          default: self
      responses:
        "200":
          description: A successful response.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/apiGetUserVolResponse'
        "401":
          description: Unauthorized.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/apiUnauthorizedResponse'
        "500":
          description: An unexpected error response.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/apiErrorResponse'
  /withdrawals/coinbase-account:
    post:
      tags:
      - Transfers
      summary: Withdraw to Coinbase account
      description: Withdraws funds from the specified `profile_id` to a www.coinbase.com
        wallet.
      operationId: ExchangeRESTAPI_PostWithdrawCoinbaseAccount
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/apiPublicPostWithdrawCoinbaseAccountRequest'
        required: true
      responses:
        "200":
          description: A successful response.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/apiPostWithdrawCoinbaseAccountResponse'
        "401":
          description: Unauthorized.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/apiUnauthorizedResponse'
        "500":
          description: An unexpected error response.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/apiErrorResponse'
      x-codegen-request-body-name: body
  /withdrawals/counterparty:
    post:
      tags:
      - Transfers
      summary: Withdraw to counterparty
      description: Withdraw funds from a specified currency account to a counterparty
        account
      operationId: ExchangeRESTAPI_PostWithdrawCounterparty
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/apiPublicPostTransferCounterpartyRequest'
        required: true
      responses:
        "200":
          description: ""
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/apiCounterpartyTransferResult'
        "500":
          description: An unexpected error response.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/apiErrorResponse'
      x-codegen-request-body-name: body
  /withdrawals/crypto:
    post:
      tags:
      - Transfers
      summary: Withdraw to crypto address
      description: Withdraws funds from the specified `profile_id` to an external
        crypto address
      operationId: ExchangeRESTAPI_PostWithdrawCrypto
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/apiPublicPostTransferCryptoRequest'
        required: true
      responses:
        "200":
          description: ""
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/apiTransferResult'
        "401":
          description: Unauthorized.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/apiUnauthorizedResponse'
        "500":
          description: An unexpected error response.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/apiErrorResponse'
      x-codegen-request-body-name: body
  /withdrawals/fee-estimate:
    get:
      tags:
      - Transfers
      summary: Get fee estimate for crypto withdrawal
      description: Gets the fee estimate for the crypto withdrawal to crypto address
      operationId: ExchangeRESTAPI_GetWithdrawFeeEstimate
      parameters:
      - name: currency
        in: query
        schema:
          type: string
      - name: crypto_address
        in: query
        schema:
          type: string
      - name: network
        in: query
        schema:
          type: string
      responses:
        "200":
          description: ""
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/apiFeeEstimateResult'
        "401":
          description: Unauthorized.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/apiUnauthorizedResponse'
        "500":
          description: An unexpected error response.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/apiErrorResponse'
  /withdrawals/payment-method:
    post:
      tags:
      - Transfers
      summary: Withdraw to payment method
      description: Withdraws funds from the specified `profile_id` to a linked external
        payment method
      operationId: ExchangeRESTAPI_PostWithdrawPaymentMethod
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/apiPublicPostWithdrawPaymentMethodRequest'
        required: true
      responses:
        "200":
          description: A successful response.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/apiPostWithdrawPaymentMethodResponse'
        "401":
          description: Unauthorized.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/apiUnauthorizedResponse'
        "500":
          description: An unexpected error response.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/apiErrorResponse'
      x-codegen-request-body-name: body
  /wrapped-assets:
    get:
      tags:
      - Wrapped assets
      summary: Get all wrapped assets
      description: Returns a list of all supported wrapped assets details objects
      operationId: ExchangeRESTAPI_GetWrappedAssets
      responses:
        "200":
          description: ""
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/apiWrappedAssets'
        "500":
          description: An unexpected error response.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/apiErrorResponse'
      security: []
  /wrapped-assets/redeem:
    get:
      tags:
      - Wrapped assets
      summary: Get all redeems
      description: Get details for all redeems in the profile associated with the
        API key.
      operationId: ExchangeRESTAPI_ListWrappedAssetRedeems
      parameters:
      - name: before
        in: query
        description: "Used for pagination, returns stake-wraps with created_at timestamps\
          \ newer than before date. Example date format 2023-03-15T23:40:04.505Z."
        schema:
          type: string
      - name: after
        in: query
        description: "Used for pagination, returns stake-wraps with created_at timestamps\
          \ older than after date. Example date format 2023-03-15T23:40:04.505Z."
        schema:
          type: string
      - name: limit
        in: query
        description: Limit on number of results to return.
        schema:
          type: integer
          format: int64
      - name: from_currency
        in: query
        description: "from_currency, i.e. CBETH."
        schema:
          type: string
      - name: to_currency
        in: query
        description: "to_currency, i.e. ETH."
        schema:
          type: string
      - name: status
        in: query
        schema:
          type: string
      responses:
        "200":
          description: ""
          content:
            application/json:
              schema:
                type: array
                items:
                  $ref: '#/components/schemas/apiRedeem'
        "401":
          description: Unauthorized.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/apiUnauthorizedResponse'
        "500":
          description: An unexpected error response.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/apiErrorResponse'
    post:
      tags:
      - Wrapped assets
      summary: Initiates the creation/processing of a redeem
      description: Redeems `from_currency` to `to_currency`. Funds are redeemed in
        the profile associated with the API key.
      operationId: ExchangeRESTAPI_PostWrappedAssetRedeem
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/apiPublicPostWrappedAssetRedeemRequest'
        required: true
      responses:
        "200":
          description: A successful response.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/apiPostWrappedAssetsRedeemResponse'
        "401":
          description: Unauthorized.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/apiUnauthorizedResponse'
        "500":
          description: An unexpected error response.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/apiErrorResponse'
      x-codegen-request-body-name: body
  /wrapped-assets/redeem/{redeem_id}:
    get:
      tags:
      - Wrapped assets
      summary: Get a single redeem
      description: Get details for a specific redeem in the profile associated with
        the API key.
      operationId: ExchangeRESTAPI_GetWrappedAssetRedeem
      parameters:
      - name: redeem_id
        in: path
        required: true
        schema:
          type: string
      responses:
        "200":
          description: ""
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/apiRedeem'
        "401":
          description: Unauthorized.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/apiUnauthorizedResponse'
        "500":
          description: An unexpected error response.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/apiErrorResponse'
  /wrapped-assets/stake-wrap:
    get:
      tags:
      - Wrapped assets
      summary: Get all stake-wraps
      description: Get details for all stake-wraps in the profile associated with
        the API key.
      operationId: ExchangeRESTAPI_GetAllWrappedAssetStakeWraps
      parameters:
      - name: before
        in: query
        description: "Used for pagination, returns stake-wraps with created_at timestamps\
          \ newer than before date. Example date format 2023-03-15T23:40:04.505Z."
        schema:
          type: string
      - name: after
        in: query
        description: "Used for pagination, returns stake-wraps with created_at timestamps\
          \ older than after date. Example date format 2023-03-15T23:40:04.505Z."
        schema:
          type: string
      - name: limit
        in: query
        description: Limit on number of results to return.
        schema:
          type: integer
          format: int64
      - name: from
        in: query
        description: "from_currency, i.e. ETH."
        schema:
          type: string
      - name: to
        in: query
        description: "to_currency, i.e. CBETH."
        schema:
          type: string
      - name: status
        in: query
        schema:
          type: string
      responses:
        "200":
          description: ""
          content:
            application/json:
              schema:
                type: array
                items:
                  $ref: '#/components/schemas/apiStakeWrap'
        "401":
          description: Unauthorized.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/apiUnauthorizedResponse'
        "500":
          description: An unexpected error response.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/apiErrorResponse'
    post:
      tags:
      - Wrapped assets
      summary: Create a new stake-wrap
      description: Stakes and wraps `from_currency` to `to_currency`. Funds are stake-wrapped
        in the profile associated with the API key.
      operationId: ExchangeRESTAPI_PostWrappedAssetStakeWrap
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/apiPublicPostWrappedAssetStakeWrapRequest'
        required: true
      responses:
        "200":
          description: ""
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/apiStakeWrap'
        "401":
          description: Unauthorized.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/apiUnauthorizedResponse'
        "500":
          description: An unexpected error response.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/apiErrorResponse'
      x-codegen-request-body-name: body
  /wrapped-assets/stake-wrap/{stake_wrap_id}:
    get:
      tags:
      - Wrapped assets
      summary: Get a single stake-wrap
      description: Get details for a specific stake-wrap in the profile associated
        with the API key.
      operationId: ExchangeRESTAPI_GetWrappedAssetStakeWrap
      parameters:
      - name: stake_wrap_id
        in: path
        required: true
        schema:
          type: string
      responses:
        "200":
          description: ""
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/apiStakeWrap'
        "401":
          description: Unauthorized.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/apiUnauthorizedResponse'
        "500":
          description: An unexpected error response.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/apiErrorResponse'
  /wrapped-assets/{wrapped_asset_id}:
    get:
      tags:
      - Wrapped assets
      summary: Get wrapped asset details
      description: "Returns the circulating and total supply of a wrapped asset, and\
        \ its conversion rate"
      operationId: ExchangeRESTAPI_GetWrappedAsset
      parameters:
      - name: wrapped_asset_id
        in: path
        required: true
        schema:
          type: string
      responses:
        "200":
          description: ""
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/apiWrappedAsset'
        "400":
          description: Bad request.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/apiErrorResponse'
        "404":
          description: Not found.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/apiErrorResponse'
        "500":
          description: An unexpected error response.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/apiErrorResponse'
      security: []
  /wrapped-assets/{wrapped_asset_id}/conversion-rate:
    get:
      tags:
      - Wrapped assets
      summary: Get wrapped asset conversion rate
      description: Returns the conversion rate of a wrapped asset
      operationId: ExchangeRESTAPI_GetWrappedAssetConversionRate
      parameters:
      - name: wrapped_asset_id
        in: path
        required: true
        schema:
          type: string
      responses:
        "200":
          description: ""
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/apiWrappedAssetConversionRate'
        "400":
          description: Bad request.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/apiErrorResponse'
        "500":
          description: An unexpected error response.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/apiErrorResponse'
      security: []
components:
  schemas:
    AccountHoldAccountHoldType:
      type: string
      default: order
      enum:
      - order
      - transfer
      - funding
      - profile_transfer
      - otc_order
      - launch_sell
      - launch_buy
      - engine_credit_operation
    AccountLedgerEntryAccountLedgerType:
      type: string
      default: transfer
      enum:
      - transfer
      - match
      - fee
      - conversion
      - margin_interest
      - rebate
      - otc_fee
      - otc_match
      - tax_credit
      - rfq_match
      - rfq_fee
      - match_conversion
      - stake_wrap
      - conversion_fee
      - redeem
    CoinbaseAccountCoinbaseAccountType:
      type: string
      default: wallet
      enum:
      - wallet
      - fiat
    GetAddressBookResponseAddressInfo:
      required:
      - address
      - address_book_added_at
      - currency
      - id
      - label
      type: object
      properties:
        id:
          type: string
        address:
          type: string
        destination_tag:
          type: string
        currency:
          type: string
          description: "Asset symbol for the saved address (e.g., `BTC`, `ETH`, `USDC`).\
            \ `_ALL_ASSETS_` indicates that this address is stored globally for all\
            \ assets, rather than a specific one. The `network` field determines which\
            \ blockchain network the address applies to."
        label:
          type: string
        address_book_added_at:
          type: string
          format: date-time
        is_verified_self_hosted_wallet:
          type: boolean
          description: Flag to indicate if the crypto addresses has previously been
            digitally signed and verified when added in the Address Book UI tab
        vasp_id:
          type: string
          description: The VASP identifier if the address is owned by one of the supported
            Virtual Asset Service Providers
        business_name:
          type: string
          description: Business name of the originator's account - only populated
            for travel rules regions
        business_country_code:
          type: string
          description: The country code (ISO 3166-1 alpha-2) of the originator's account
            location - only populated for travel rules regions
        network:
          type: string
          description: "Blockchain network of the address. If omitted or `null`, the\
            \ address is available on all supported networks compatible with the asset\
            \ (e.g., both `ethereum` and `arbitrum` for an ERC-20 token). When `currency`\
            \ is `_ALL_ASSETS_` and network is `_ALL_EVM_NETWORKS_`, the address is\
            \ available on all assets with EVM-compatible networks."
      example:
        id: e9c483b8-c502-11ec-9d64-0242ac120002
        address: 1JmYrFBLMSCLBwoL87gdQ5Qc9MLvb2egKk
        currency: ETH
        label: my wallet
        address_book_added_at: 2019-02-06T22:27:50.221Z
        is_verified_self_hosted_wallet: false
        business_name: Example Business
        business_country_code: US
    apiAccount:
      required:
      - available
      - balance
      - currency
      - hold
      - id
      - profile_id
      - trading_enabled
      type: object
      properties:
        id:
          type: string
        currency:
          type: string
        balance:
          type: string
        hold:
          type: string
        available:
          type: string
        profile_id:
          type: string
        trading_enabled:
          type: boolean
        pending_deposit:
          type: string
          description: Amount in pending deposits transfers.
        display_name:
          type: string
      example:
        id: 7fd0abc0-e5ad-4cbb-8d54-f2b3f43364da
        currency: USD
        balance: "0.0000000000000000"
        hold: "0.0000000000000000"
        available: "0"
        profile_id: 8058d771-2d88-4f0f-ab6e-299c153d4308
        trading_enabled: true
    apiAccountHold:
      required:
      - created_at
      - id
      - ref
      - type
      - updated_at
      type: object
      properties:
        id:
          type: string
        created_at:
          type: string
          format: date-time
        updated_at:
          type: string
          format: date-time
        type:
          $ref: '#/components/schemas/AccountHoldAccountHoldType'
        ref:
          type: string
      example:
        created_at: 2020-03-11T20:48:46.622052Z
        id: c5cdd687-2d03-4a87-8dd7-c693a4bb766f
        amount: "10.0500000000000000"
        type: order
        ref: a9625b04-fc66-4999-a876-543c3684d702
    apiAccountLedgerEntry:
      required:
      - amount
      - balance
      - created_at
      - details
      - id
      - type
      type: object
      properties:
        id:
          type: string
        amount:
          type: string
        created_at:
          type: string
          format: date-time
        balance:
          type: string
        type:
          $ref: '#/components/schemas/AccountLedgerEntryAccountLedgerType'
        details:
          type: object
          additionalProperties:
            type: string
      example:
        created_at: 2019-06-11T22:11:56.382749Z
        id: "1444415179"
        amount: "3.2200000000000000"
        balance: "3.2200000000000000"
        type: transfer
        details:
          to: 6d326768-71f2-4068-99dc-7075c78f6402
          from: 20640810-6219-4d3b-95f4-5e1741dd6ea4
          profile_transfer_id: 1f854356-4923-4b10-8db1-d82f7fae8eda
    apiAccountReport:
      type: object
      properties:
        start_date:
          type: string
          description: Start date for items to be included in report.
          default: <30 days ago from end_date>
        end_date:
          type: string
          description: End date for items to be included in report
          default: <today>
        account_id:
          type: string
          description: Account - Which account to generate the report for
    apiAddressBookNewAddress:
      required:
      - currency
      - label
      - to
      type: object
      properties:
        currency:
          type: string
          description: "Asset symbol for the saved address (e.g., `BTC`, `ETH`, `USDC`).\
            \ Use `_ALL_ASSETS_` to indicate that this address is stored globally\
            \ for all assets, rather than a specific one. When `currency` is set to\
            \ `_ALL_ASSETS_`, the `network` field is required to define the applicable\
            \ blockchain network."
        to:
          $ref: '#/components/schemas/apiAddressData'
        label:
          type: string
          description: Label/nickname for address book entry
        is_verified_self_hosted_wallet:
          type: boolean
          description: Flag indicating whether the crypto address was digitally signed
            and verified when added in the Address Book UI. This is mandatory for
            crypto withdrawals in jurisdictions governed by travel rules.
        vasp_id:
          type: string
          description: VASP identifier for addresses owned by supported Virtual Asset
            Service Providers. Required for crypto withdrawals in jurisdictions governed
            by travel rules.
          enum:
          - Coinbase
          - Anchorage
          - Balance
          - bitFlyer
          - BitGo
          - Bittrex
          - Circle
          - Coinhako
          - Fidelity
          - Gemini
          - Kraken
          - Paxos
          - PayPal
          - Robinhood
          - Shakepay
          - Standard Custody
          - Tradestation
          - Zero Hash
        business_name:
          type: string
          description: Business name
        business_country_code:
          type: string
          description: The country code (ISO 3166-1 alpha-2) of the originator's account
            location.
        is_certified_self_send:
          type: boolean
          description: Flag to indicate if the user owns the crypto address
        network:
          type: string
          description: "Blockchain network of the address. Provide a single network\
            \ name (e.g., `ethereum`, `bitcoin`). If omitted or `null`, the address\
            \ is available on all supported networks compatible with the asset (e.g.,\
            \ both `ethereum` and `arbitrum` for an ERC-20 token). When `currency`\
            \ is `_ALL_ASSETS_`, `network` is required. Use `_ALL_EVM_NETWORKS_` only\
            \ with `_ALL_ASSETS_` to apply the address to all EVM-compatible networks."
        wallet_verification_network:
          type: string
          description: Blockchain network used to verify ownership of the wallet address.
            Required for self-hosted wallets in jurisdictions governed by travel rules.
    apiAddressBookWhitelistedAddress:
      required:
      - address
      - address_book_added_at
      - address_booked
      - address_info
      - currency
      - display_address
      - id
      - label
      type: object
      properties:
        id:
          type: string
        address:
          type: string
        address_info:
          $ref: '#/components/schemas/apiAddressBookWhitelistedAddressInfo'
        currency:
          type: string
          description: "Asset symbol for the saved address (e.g., `BTC`, `ETH`, `USDC`).\
            \ `_ALL_ASSETS_` indicates that this address is stored globally for all\
            \ assets, rather than a specific one. The `network` field determines which\
            \ blockchain network the address applies to."
        label:
          type: string
        display_address:
          type: string
        address_booked:
          type: boolean
        address_book_added_at:
          type: string
          format: date-time
        address_book_entry_pending_until:
          type: string
          format: date-time
        is_verified_self_hosted_wallet:
          type: boolean
          description: Flag to indicate if the crypto addresses has previously been
            digitally signed and verified when added in the Address Book UI tab
        vasp_id:
          type: string
          description: The VASP identifier if the address is owned by one of the supported
            Virtual Asset Service Providers
        business_name:
          type: string
          description: Business name of the originator's account
        business_country_code:
          type: string
          description: The country code (ISO 3166-1 alpha-2) of the originator's account
            location.
        network:
          type: string
          description: "Blockchain network of the address. Indicates the network scope\
            \ the address is associated with (e.g., `ethereum`, `bitcoin`). If omitted\
            \ or `null`, the address is available on all supported networks compatible\
            \ with the asset (e.g., both `ethereum` and `arbitrum` for an ERC-20 token).\
            \ `_ALL_EVM_NETWORKS_` indicates the address applies to all EVM-compatible\
            \ networks."
      example:
        id: "1"
        address: 1JmYrFBLMSCLBwoL87gdQ5Qc9MLvb2egKk
        display_address: 1JmYrFBLMSCLBwoL87gdQ5Qc9MLvb2egKk
        address_info:
          address: 1JmYrFBLMSCLBwoL87gdQ5Qc9MLvb2egKk
          display_address: 1JmYrFBLMSCLBwoL87gdQ5Qc9MLvb2egKk
        currency: BTC
        label: my wallet
        address_booked: true
        address_book_added_at: 2019-02-06T22:27:50.221Z
    apiAddressBookWhitelistedAddressInfo:
      required:
      - address
      - display_address
      type: object
      properties:
        address:
          type: string
        display_address:
          type: string
        destination_tag:
          type: string
    apiAddressData:
      required:
      - address
      type: object
      properties:
        address:
          type: string
          description: Crypto address
        destination_tag:
          type: string
          description: Field for destination tag/memo for supported currencies. Ensure
            destination tag/memo is provided if sending to the address requires it
    apiAggregatedData:
      type: object
      properties:
        activity_metrics:
          $ref: '#/components/schemas/apiUserAggregatedData'
    apiAmount:
      type: object
      properties:
        native:
          type: string
        notional:
          type: string
    apiAuctionBook:
      required:
      - auction_state
      - best_ask_price
      - best_ask_size
      - best_bid_price
      - best_bid_size
      - open_price
      - open_size
      type: object
      properties:
        open_price:
          type: string
        open_size:
          type: string
        best_bid_price:
          type: string
        best_bid_size:
          type: string
        best_ask_price:
          type: string
        best_ask_size:
          type: string
        auction_state:
          type: string
        can_open:
          type: string
        time:
          type: string
          format: date-time
      example:
        indicative_open_price: "333.99"
        indicative_open_size: "0.193"
        indicative_bid_price: "333.98"
        indicative_bid_size: "4.39088265"
        indicative_ask_price: "333.99"
        indicative_ask_size: "25.23542881"
        auction_status: CAN_OPEN
    apiBalanceReport:
      type: object
      properties:
        datetime:
          type: string
          description: "Designated date and time of the balance statement. Timezone\
            \ is always UTC. If this field is empty, a report of the user’s current\
            \ balance will be generated."
        group_by_profile:
          type: boolean
          description: Not applicable if generating report through an API key; only
            available through report generation via the Exchange user interface (UI).
    apiCoinbaseAccount:
      required:
      - active
      - balance
      - currency
      - hold_balance
      - hold_currency
      - id
      - name
      - primary
      - type
      type: object
      properties:
        id:
          type: string
        name:
          type: string
        balance:
          type: string
        currency:
          type: string
        type:
          $ref: '#/components/schemas/CoinbaseAccountCoinbaseAccountType'
        primary:
          type: boolean
        active:
          type: boolean
        hold_balance:
          type: string
        hold_currency:
          type: string
        destination_tag_name:
          type: string
        destination_tag_regex:
          type: string
      example:
        available_on_consumer: true
        hold_balance: "0.00"
        id: OXT
        hold_currency: USD
        balance: "0.00000000"
        currency: OXT
        primary: false
        name: OXT Wallet
        type: wallet
        active: true
    apiCoinbaseAccountAddressInfo:
      required:
      - address
      type: object
      properties:
        address:
          type: string
        destination_tag:
          type: string
    apiCoinbaseAccountAddressWarning:
      required:
      - details
      - image_url
      - title
      type: object
      properties:
        title:
          type: string
        details:
          type: string
        image_url:
          type: string
    apiCoinbaseAccountGeneratedDepositAddress:
      required:
      - address
      - address_info
      - created_at
      - id
      - name
      - network
      - resource
      - resource_path
      - updated_at
      - uri_scheme
      - warnings
      type: object
      properties:
        id:
          type: string
        address:
          type: string
        address_info:
          $ref: '#/components/schemas/apiCoinbaseAccountAddressInfo'
        name:
          type: string
        created_at:
          type: string
          format: date-time
        updated_at:
          type: string
          format: date-time
        network:
          type: string
        uri_scheme:
          type: string
        resource:
          type: string
        resource_path:
          type: string
        warnings:
          type: array
          items:
            $ref: '#/components/schemas/apiCoinbaseAccountAddressWarning'
        legacy_address:
          type: string
        destination_tag:
          type: string
        deposit_uri:
          type: string
        callback_url:
          type: string
        qr_code_image_url:
          type: string
        address_label:
          type: string
        share_address_copy:
          $ref: '#/components/schemas/apiShareAddressInfo'
        exchange_deposit_address:
          type: boolean
        inline_warning:
          $ref: '#/components/schemas/apiInlineWarning'
      example:
        id: fc9fed1e-d25b-54d8-b52b-7fa250c9ae2d
        address: 0xd518A6B23D8bCA15B9cC46a00Be8a818E34Ca79E
        address_info:
          address: 0xd518A6B23D8bCA15B9cC46a00Be8a818E34Ca79E
        name: New exchange deposit address
        created_at: 2020-03-31T02:38:44Z
        updated_at: 2020-03-31T02:38:44Z
        network: ethereum
        uri_scheme: ethereum
        resource: address
        resource_path: /v2/accounts/faf4b657-a48c-56b2-bec2-77567e3f4f97/addresses/fc9fed1e-d25b-54d8-b52b-7fa250c9ae2d
        warnings:
        - title: Only send Orchid (OXT) to this address
          details: "Sending any other digital asset, including Ethereum (ETH), will\
            \ result in permanent loss."
          image_url: https://dynamic-assets.coinbase.com/22b24ad9886150535671f158ccb0dd9d12089803728551c998e17e0f503484e9c38f3e8735354b5e622753684f040488b08d55b8ef5fef51592680f0c572bdfe/asset_icons/023010d790b9b1f47bc285802eafeab3d83c4de2029fe808d59935fbc54cdd7c.png
        deposit_uri: ethereum:0x4575f41308ec1483f3d399aa9a2826d74da13deb/transfer?address=0xd518A6B23D8bCA15B9cC46a00Be8a818E34Ca79E
        exchange_deposit_address: true
    apiConversion:
      required:
      - amount
      - fee_amount
      - from
      - from_account_id
      - id
      - to
      - to_account_id
      type: object
      properties:
        id:
          type: string
        amount:
          type: string
        from_account_id:
          type: string
        to_account_id:
          type: string
        from:
          type: string
        to:
          type: string
        fee_amount:
          type: string
        created_at:
          type: string
      example:
        id: c5aaf125-d99e-41fe-82ea-ad068038b278
        amount: "11.00000000"
        from_account_id: 5dcc143c-fb96-4f72-aebf-a165e3d29b53
        to_account_id: 6100247f-90fc-4335-ac17-d99839f0c909
        from: USDC
        to: USD
        fee_amount: "0.0000000000000000"
    apiConversionFee:
      required:
      - available_credit
      - from_currency
      - to_currency
      type: object
      properties:
        from_currency:
          type: string
        to_currency:
          type: string
        min_fee_rate:
          type: string
        thirty_day_net_volume:
          type: string
        fee_tiers:
          type: array
          items:
            $ref: '#/components/schemas/apiConversionFeeTier'
        available_credit:
          type: string
      example:
        from_currency: USDC
        to_currency: USD
        fee_rate: "0.001"
        thirty_day_volume: "1000000.00000000"
        available_credit: "1000000.00000000"
    apiConversionFeeTier:
      required:
      - fee_rate
      - from_amount
      - to_amount
      type: object
      properties:
        from_amount:
          type: string
        to_amount:
          type: string
        fee_rate:
          type: string
      example:
        from_amount: "0"
        to_amount: "75000000"
        fee_rate: "0.001"
    apiCounterpartyAddress:
      required:
      - added_at
      - address
      - id
      - label
      type: object
      properties:
        id:
          type: string
        address:
          type: string
        label:
          type: string
        added_at:
          type: string
          format: date-time
      example:
        id: 22cc4cc1-3f03-4dc6-bc72-7094e9cf48f8
        address: CBX7NWINZS
        label: counterparty
        added_at: 2019-02-06T22:27:50.221Z
    apiCounterpartyTransferResult:
      type: object
      properties:
        id:
          type: string
        counterparty_id:
          type: string
        amount:
          type: string
        currency:
          type: string
        status:
          $ref: '#/components/schemas/apiCounterpartyTransferStatus'
    apiCounterpartyTransferStatus:
      type: string
      default: UNKNOWN
      enum:
      - UNKNOWN
      - PENDING
      - DONE
    apiCurrency:
      required:
      - details
      - id
      - max_precision
      - min_size
      - name
      - status
      type: object
      properties:
        id:
          type: string
        name:
          type: string
        min_size:
          type: string
        status:
          type: string
        message:
          type: string
        max_precision:
          type: string
        convertible_to:
          type: array
          items:
            type: string
        details:
          $ref: '#/components/schemas/apiCurrencyDetails'
        default_network:
          type: string
        supported_networks:
          type: array
          items:
            $ref: '#/components/schemas/apiNetwork'
        display_name:
          type: string
      example:
        id: USD
        name: United States Dollar
        min_size: "0.01"
        max_precision: "0.01"
        status: online
        details:
          type: fiat
          symbol: $
          sort_order: 1
          push_payment_methods:
          - bank_wire
          - fedwire
          - swift_bank_account
          - intra_bank_account
          display_name: US Dollar
          group_types:
          - fiat
          - usd
    apiCurrencyDetails:
      type: object
      properties:
        type:
          $ref: '#/components/schemas/apiCurrencyType'
        symbol:
          type: string
        network_confirmations:
          type: integer
          format: int32
        sort_order:
          type: integer
          format: int32
        crypto_address_link:
          type: string
        crypto_transaction_link:
          type: string
        push_payment_methods:
          type: array
          items:
            type: string
        group_types:
          type: array
          items:
            type: string
        display_name:
          type: string
        processing_time_seconds:
          type: number
          format: float
        min_withdrawal_amount:
          type: number
          format: double
        max_withdrawal_amount:
          type: number
          format: double
    apiCurrencyType:
      type: string
      default: crypto
      enum:
      - crypto
      - fiat
    apiDate:
      type: object
      properties:
        year:
          type: integer
          description: Year of the date. Must be from 1 to 9999.
          format: int32
        month:
          type: integer
          description: Month of a year. Must be from 1 to 12.
          format: int32
        day:
          type: integer
          description: Day of a month. Must be from 1 to 31 and valid for the year
            and month.
          format: int32
    apiDeleteOrderResponse:
      type: object
      properties:
        order_id:
          type: string
          description: the `id` of the order that was cancelled`
    apiDeleteOrdersResponse:
      type: object
      properties:
        body:
          type: array
          description: A list of the `id`s of open orders that were successfully cancelled
          items:
            type: string
      example:
      - 496ffbba-7dae-4864-f7e8-a5bf52c6d0e2
    apiErrorResponse:
      type: object
      properties:
        message:
          title: message
          pattern: "^[a-zA-Z0-9]{1, 32}$"
          type: string
    apiFeeEstimateResult:
      type: object
      properties:
        fee:
          type: string
        fee_before_subsidy:
          type: string
    apiFees:
      required:
      - maker_fee_rate
      - taker_fee_rate
      type: object
      properties:
        taker_fee_rate:
          type: string
          description: Taker fee rate.
          example: "0.0050"
        maker_fee_rate:
          type: string
          description: Maker fee rate.
          example: "0.0050"
        usd_volume:
          type: string
          description: The 30 days trailing volume in USD.
          example: "43806.92"
      description: Fees defines taker and maker fees for a given user including the
        volume in USD.
      example:
        maker_fee_rate: "0.0050"
        taker_fee_rate: "0.0050"
        usd_volume: "43806.92"
    apiFillsReport:
      type: object
      properties:
        start_date:
          type: string
          description: Start date for items to be included in report.
          default: <30 days ago from end_date>
        end_date:
          type: string
          description: End date for items to be included in report
          default: <today>
        product_id:
          type: string
          description: Product - Which product to generate the report for
    apiGetAccountHoldsResponse:
      type: object
      properties:
        body:
          type: array
          items:
            $ref: '#/components/schemas/apiAccountHold'
    apiGetAccountLedgerResponse:
      type: object
      properties:
        body:
          type: array
          items:
            $ref: '#/components/schemas/apiAccountLedgerEntry'
    apiGetAccountResponse:
      type: object
      properties:
        body:
          $ref: '#/components/schemas/apiAccount'
    apiGetAccountTransfersResponse:
      type: object
      properties:
        body:
          type: array
          items:
            $ref: '#/components/schemas/apiTransfer'
    apiGetAccountsResponse:
      type: object
      properties:
        body:
          type: array
          items:
            $ref: '#/components/schemas/apiAccount'
    apiGetAddressBookResponse:
      type: object
      properties:
        body:
          type: array
          items:
            $ref: '#/components/schemas/GetAddressBookResponseAddressInfo'
    apiGetAllConversionsResponse:
      type: object
      properties:
        body:
          type: array
          items:
            $ref: '#/components/schemas/apiConversion'
    apiGetAllWrappedAssetStakeWrapsResponse:
      type: object
      properties:
        body:
          type: array
          items:
            $ref: '#/components/schemas/apiStakeWrap'
    apiGetCoinbaseAccountsResponse:
      type: object
      properties:
        body:
          type: array
          items:
            $ref: '#/components/schemas/apiCoinbaseAccount'
    apiGetConversionFeesResponse:
      type: object
      properties:
        body:
          type: array
          items:
            $ref: '#/components/schemas/apiConversionFee'
    apiGetConversionResponse:
      type: object
      properties:
        body:
          $ref: '#/components/schemas/apiConversion'
    apiGetCounterpartyAddressBookResponse:
      type: object
      properties:
        body:
          type: array
          items:
            $ref: '#/components/schemas/apiCounterpartyAddress'
    apiGetCurrenciesResponse:
      type: object
      properties:
        body:
          type: array
          items:
            $ref: '#/components/schemas/apiCurrency'
    apiGetCurrencyResponse:
      type: object
      properties:
        body:
          $ref: '#/components/schemas/apiCurrency'
    apiGetFcmAutoLoanResponse:
      type: object
      properties:
        auto_loan:
          type: boolean
    apiGetFcmUsdcMarginResponse:
      type: object
      properties:
        enabled:
          type: boolean
    apiGetFeesResponse:
      type: object
      properties:
        body:
          $ref: '#/components/schemas/apiFees'
      description: GetFeesResponse is used by the GET /fees.
    apiGetFillsResponse:
      type: object
      properties:
        body:
          type: array
          items:
            $ref: '#/components/schemas/apiOrderFill'
    apiGetInterestChargesResponse:
      type: object
      properties:
        body:
          type: array
          items:
            $ref: '#/components/schemas/apiInterestCharge'
    apiGetInterestHistoryResponse:
      type: object
      properties:
        body:
          type: array
          items:
            $ref: '#/components/schemas/apiInterestRate'
    apiGetInterestSummaryResponse:
      type: object
      properties:
        body:
          type: array
          items:
            $ref: '#/components/schemas/apiInterestSummary'
    apiGetLoanAssetsResponse:
      type: object
      properties:
        collateral_assets:
          type: object
          additionalProperties:
            type: string
        diversification_ratio:
          type: string
        borrowable_assets:
          type: array
          items:
            type: string
    apiGetLoanLendingOverviewResponse:
      type: object
      properties:
        body:
          $ref: '#/components/schemas/apiLendingOverviewResult'
    apiGetLoansResponse:
      type: object
      properties:
        loans:
          type: array
          items:
            $ref: '#/components/schemas/apiLoan'
    apiGetNewLoanOptionsResponse:
      type: object
      properties:
        options:
          type: array
          items:
            $ref: '#/components/schemas/apiNewLoanOption'
    apiGetLoanLendingOverviewXMResponse:
      type: object
      properties:
        body:
          $ref: '#/components/schemas/apiLendingOverviewXMResult'
    apiGetPreviewXMResponse:
      type: object
      properties:
        before:
          $ref: '#/components/schemas/apiLendingOverviewXM'
        after:
          $ref: '#/components/schemas/apiLendingOverviewXM'
    apiGetOrderResponse:
      type: object
      properties:
        body:
          $ref: '#/components/schemas/apiOrder'
    apiGetOrdersResponse:
      type: object
      properties:
        body:
          type: array
          items:
            $ref: '#/components/schemas/apiOrder'
    apiGetPaymentMethodsResponse:
      type: object
      properties:
        body:
          type: array
          items:
            $ref: '#/components/schemas/apiPaymentMethod'
    apiGetPreviewResponse:
      type: object
      properties:
        before:
          $ref: '#/components/schemas/apiLendingOverview'
        after:
          $ref: '#/components/schemas/apiLendingOverview'
    apiGetProductBookResponse:
      type: object
      properties:
        body:
          $ref: '#/components/schemas/apiProductBook'
    apiGetProductCandlesResponse:
      type: object
      properties:
        body:
          type: array
          items:
            type: object
            properties: {}
    apiGetProductResponse:
      type: object
      properties:
        body:
          $ref: '#/components/schemas/apiProduct'
    apiGetProductStatsResponse:
      type: object
      properties:
        body:
          $ref: '#/components/schemas/apiProductStats'
    apiGetProductTickerResponse:
      type: object
      properties:
        body:
          $ref: '#/components/schemas/apiProductTicker'
    apiGetProductTradesResponse:
      type: object
      properties:
        body:
          type: array
          items:
            $ref: '#/components/schemas/apiProductTrade'
    apiGetProductsResponse:
      type: object
      properties:
        body:
          type: array
          items:
            $ref: '#/components/schemas/apiProduct'
    apiGetProductsVolumeResponse:
      type: object
      properties:
        body:
          type: array
          items:
            $ref: '#/components/schemas/apiProductVolume'
    apiGetProfileResponse:
      type: object
      properties:
        body:
          $ref: '#/components/schemas/apiProfile'
    apiGetProfilesResponse:
      type: object
      properties:
        body:
          type: array
          items:
            $ref: '#/components/schemas/apiProfile'
    apiGetReportResponse:
      type: object
      properties:
        body:
          $ref: '#/components/schemas/apiReport'
    apiGetReportsResponse:
      type: object
      properties:
        body:
          type: array
          items:
            $ref: '#/components/schemas/apiReport'
    apiGetTransferFeeEstimateResponse:
      type: object
      properties:
        body:
          $ref: '#/components/schemas/apiFeeEstimateResult'
    apiGetTransferResponse:
      type: object
      properties:
        body:
          $ref: '#/components/schemas/apiTransfer'
    apiGetTransfersResponse:
      type: object
      properties:
        body:
          type: array
          items:
            $ref: '#/components/schemas/apiTransfer'
    apiGetTravelRulesResponse:
      type: object
      properties:
        body:
          type: array
          items:
            $ref: '#/components/schemas/apiTravelRulePii'
    apiGetUserExchangeLimitsResponse:
      type: object
      properties:
        body:
          $ref: '#/components/schemas/apiUserExchangeTransferLimits'
    apiGetUserVolResponse:
      type: object
      properties:
        aggregated_data:
          $ref: '#/components/schemas/apiAggregatedData'
        individual_data:
          type: array
          items:
            $ref: '#/components/schemas/apiIndividualData'
    apiGetWrappedAssetConversionRateResponse:
      type: object
      properties:
        body:
          $ref: '#/components/schemas/apiWrappedAssetConversionRate'
    apiGetWrappedAssetRedeemResponse:
      type: object
      properties:
        redeem:
          $ref: '#/components/schemas/apiRedeem'
    apiGetWrappedAssetResponse:
      type: object
      properties:
        body:
          $ref: '#/components/schemas/apiWrappedAsset'
    apiGetWrappedAssetStakeWrapResponse:
      type: object
      properties:
        body:
          $ref: '#/components/schemas/apiStakeWrap'
    apiGetWrappedAssetsResponse:
      type: object
      properties:
        body:
          $ref: '#/components/schemas/apiWrappedAssets'
    apiIndividualData:
      type: object
      properties:
        email:
          type: string
        activity_metrics:
          $ref: '#/components/schemas/apiUserIndividualData'
    apiInlineWarning:
      type: object
      properties:
        text:
          type: string
        tooltip:
          $ref: '#/components/schemas/apiInlineWarningTooltip'
    apiInlineWarningTooltip:
      type: object
      properties:
        title:
          type: string
        subtitle:
          type: string
    apiInterestCharge:
      type: object
      properties:
        date:
          type: string
          format: date-time
        currency:
          type: string
        principal_amount:
          type: string
        interest_rate:
          type: string
        interest_accrued:
          type: string
        accrual_price:
          type: string
          description: "price of the loan's principal asset (e.g. BTC) denominated in the interest currency (e.g. USDC) at the time interest was accrued; empty if not available for this accrual"
    apiInterestRate:
      type: object
      properties:
        interest_rate:
          type: string
        effective_at:
          type: string
          format: date-time
    apiInterestRepayment:
      type: object
      properties:
        id:
          type: string
        native_amount:
          type: string
        status:
          $ref: '#/components/schemas/apiRepaymentStatus'
        type:
          $ref: '#/components/schemas/apiRepaymentType'
    apiInterestSummary:
      type: object
      properties:
        currency:
          type: string
        current_owed:
          type: string
          description: amount accrued in current month and not yet due
        last_payment_date:
          type: string
          format: date-time
        payment_status:
          $ref: '#/components/schemas/apiPaymentStatus'
        last_payment_amount:
          type: string
        prior_period_overdue:
          type: string
          description: interest payable that accrued in previous months and is now
            due
        current_interest_due_date:
          type: string
          format: date-time
    apiLendingOverview:
      type: object
      properties:
        open_loan_value:
          type: string
        collateral_value:
          type: string
        collateralization_percentage:
          type: string
        available_to_borrow:
          type: string
        available_per_asset:
          type: object
          additionalProperties:
            $ref: '#/components/schemas/apiAmount'
        withdrawal_restricted:
          type: boolean
        credit_limit_value:
          type: string
        available_credit_value:
          type: string
        collateralization_percentage_open_only:
          type: string
        pending_loan_value:
          type: string
        initial_margin_percentage:
          type: string
        minimum_margin_percentage:
          type: string
        unlock_margin_percentage:
          type: string
    apiLendingOverviewXM:
      type: object
      properties:
        open_loan_value:
          type: string
          description: Total value of open loans
        available_to_borrow:
          type: string
          description: Amount available to borrow
        withdrawal_restricted:
          type: boolean
          description: Whether withdrawals are restricted
        credit_limit_value:
          type: string
          description: Total credit limit
        available_credit_value:
          type: string
          description: Available credit
        pending_loan_value:
          type: string
          description: Value of pending loans
        margin_requirement:
          type: string
          description: Current margin requirement
        account_equity:
          type: string
          description: Total account equity
        margin_excess_shortfall:
          type: string
          description: Margin excess or shortfall amount
        consumed_credit:
          type: string
          description: Amount of credit consumed
    apiLendingOverviewResult:
      type: object
      properties:
        overview:
          $ref: '#/components/schemas/apiLendingOverview'
        loans:
          type: array
          items:
            $ref: '#/components/schemas/apiLoan'
    apiLendingOverviewXMResult:
      type: object
      properties:
        overview:
          $ref: '#/components/schemas/apiLendingOverviewXM'
        loans:
          type: array
          items:
            $ref: '#/components/schemas/apiLoan'
    apiListWrappedAssetRedeemsResponse:
      type: object
      properties:
        redeems:
          type: array
          items:
            $ref: '#/components/schemas/apiRedeem'
    apiLoan:
      type: object
      properties:
        id:
          type: string
        currency:
          type: string
        principal_amount:
          type: string
        outstanding_principal_amount:
          type: string
        interest_rate:
          type: string
        interest_currency:
          type: string
        status:
          $ref: '#/components/schemas/apiLoanStatus'
        effective_at:
          type: string
          format: date-time
        closed_at:
          type: string
          format: date-time
        term_start_date:
          type: string
          format: date-time
        term_end_date:
          type: string
          format: date-time
    apiLoanStatus:
      type: string
      default: loan_pending
      enum:
      - loan_pending
      - loan_active
      - loan_canceled
      - loan_closed
    apiMonorailCurrencyAmount:
      required:
      - amount
      - currency
      type: object
      properties:
        amount:
          type: string
        currency:
          type: string
    apiMonorailLinkedResource:
      type: object
      properties:
        id:
          type: string
        resource:
          type: string
        resource_path:
          type: string
    apiNetwork:
      type: object
      properties:
        id:
          type: string
        name:
          type: string
        status:
          type: string
        contract_address:
          type: string
        crypto_address_link:
          type: string
        crypto_transaction_link:
          type: string
        min_withdrawal_amount:
          type: number
          format: double
        max_withdrawal_amount:
          type: number
          format: double
        network_confirmations:
          type: integer
          format: int32
        processing_time_seconds:
          type: integer
          format: int32
        destination_tag_regex:
          type: string
        is_evm_network:
          type: boolean
          description: Indicates whether this network is an EVM-compatible blockchain.
    apiNewLoanOption:
      type: object
      properties:
        currency:
          type: string
        max_principal_amount:
          $ref: '#/components/schemas/apiAmount'
        interest_rate:
          type: string
        available_inventory:
          $ref: '#/components/schemas/apiAmount'
    apiOpenLoanRequest:
      type: object
      properties:
        loan_id:
          type: string
        currency:
          type: string
        native_amount:
          type: string
        interest_rate:
          type: string
        term_start_date:
          type: string
          format: date-time
        term_end_date:
          type: string
          format: date-time
        profile_id:
          type: string
    apiOpenLoanResponse:
      type: object
      properties:
        loan:
          $ref: '#/components/schemas/apiLoan'
    apiOrder:
      required:
      - created_at
      - fill_fees
      - filled_size
      - id
      - post_only
      - product_id
      - settled
      - side
      - status
      - type
      type: object
      properties:
        id:
          type: string
          description: uuid
        price:
          type: string
          description: price per unit of base currency
        size:
          type: string
          description: amount of base currency to buy/sell
        product_id:
          type: string
          description: book the order was placed on
        profile_id:
          type: string
          description: profile_id that placed the order
        side:
          $ref: '#/components/schemas/apiOrderSide'
        funds:
          type: string
          description: amount of quote currency to spend (for market orders)
        specified_funds:
          type: string
          description: funds with fees
        type:
          $ref: '#/components/schemas/apiOrderType'
        time_in_force:
          $ref: '#/components/schemas/apiOrderTimeInForce'
        expire_time:
          type: string
          description: timestamp at which order expires
          format: date-time
        post_only:
          type: boolean
          description: "if true, forces order to be `maker` only"
        created_at:
          type: string
          description: timestamp at which order was placed
          format: date-time
        done_at:
          type: string
          description: timestamp at which order was done
          format: date-time
        done_reason:
          type: string
          description: "reason order was done (filled, rejected, or otherwise)"
        reject_reason:
          type: string
          description: reason order was rejected by engine
        fill_fees:
          type: string
          description: fees paid on current filled amount
        filled_size:
          type: string
          description: amount (in base currency) of the order that has been filled
        executed_value:
          type: string
        status:
          $ref: '#/components/schemas/apiOrderStatus'
        settled:
          type: boolean
          description: true if funds have been exchanged and settled
        stop:
          $ref: '#/components/schemas/apiOrderStop'
        stop_price:
          type: string
          description: price (in quote currency) at which to execute the order
        funding_amount:
          type: string
        client_oid:
          type: string
          description: client order id
        market_type:
          type: string
          description: market type where order was traded
        max_floor:
          type: string
          description: maximum visible quantity for iceberg order
        secondary_order_id:
          type: string
          description: order id for the visible order for iceberg order
        stop_limit_price:
          type: string
          description: stop limit price for TPSL order
      example:
        id: a9625b04-fc66-4999-a876-543c3684d702
        price: "10.00000000"
        size: "1.00000000"
        product_id: BTC-USD
        profile_id: 8058d771-2d88-4f0f-ab6e-299c153d4308
        side: buy
        type: limit
        time_in_force: GTC
        post_only: true
        max_floor: "4"
        created_at: 2020-03-11T20:48:46.622052Z
        fill_fees: "0.0000000000000000"
        filled_size: "0.00000000"
        executed_value: "0.0000000000000000"
        status: open
        settled: false
    apiOrderCancelAfter:
      type: string
      default: min
      enum:
      - min
      - hour
      - day
    apiOrderFill:
      required:
      - created_at
      - fee
      - funding_currency
      - liquidity
      - order_id
      - price
      - product_id
      - profile_id
      - settled
      - side
      - size
      - trade_id
      - usd_volume
      - user_id
      type: object
      properties:
        trade_id:
          type: integer
          description: id of trade that created the fill
          format: int32
        product_id:
          type: string
          description: book the order was placed on
        order_id:
          type: string
          description: uuid
        user_id:
          type: string
          description: id of user's account
        profile_id:
          type: string
          description: profile_id that placed the order
        liquidity:
          $ref: '#/components/schemas/apiOrderFillLiquidity'
        price:
          type: string
          description: price per unit of base currency
        size:
          type: string
          description: amount of base currency to buy/sell
        fee:
          type: string
          description: fees paid on current filled amount
        created_at:
          type: string
          description: timestamp of fill
          format: date-time
        side:
          $ref: '#/components/schemas/apiOrderSide'
        settled:
          type: boolean
          description: true if funds have been exchanged and settled
        usd_volume:
          type: string
          description: true if funds have been exchanged and settled
        market_type:
          type: string
          description: market type which the order was filled in
        funding_currency:
          type: string
          description: funding currency which the order was filled in
      example:
        created_at: 2019-11-21T01:38:23.878Z
        trade_id: 78098253
        product_id: BTC-USD
        order_id: 41473628-db2c-464e-b9f4-82df7e4fb4f4
        user_id: 5cf6e115aaf44503db300f1e
        profile_id: 8058d771-2d88-4f0f-ab6e-299c153d4308
        liquidity: T
        price: "8087.38000000"
        size: "0.00601800"
        fee: "0.2433492642000000"
        side: sell
        settled: true
        usd_volume: "48.6698528400000000"
        funding_currency: USDC
    apiOrderFillLiquidity:
      type: string
      default: M
      enum:
      - M
      - T
      - O
    apiOrderMarketType:
      type: string
      default: spot
      enum:
      - spot
      - rfq
    apiOrderSide:
      type: string
      default: buy
      enum:
      - buy
      - sell
    apiOrderSortedBy:
      type: string
      default: created_at
      enum:
      - created_at
      - price
      - size
      - order_id
      - side
      - type
    apiOrderSorting:
      type: string
      default: desc
      enum:
      - desc
      - asc
    apiOrderStatus:
      type: string
      default: open
      enum:
      - open
      - pending
      - rejected
      - done
      - active
      - received
      - all
    apiOrderStop:
      type: string
      default: loss
      enum:
      - loss
      - entry
    apiOrderStpFlag:
      type: string
      default: dc
      enum:
      - dc
      - co
      - cn
      - cb
    apiOrderTimeInForce:
      type: string
      default: GTC
      enum:
      - GTC
      - GTT
      - IOC
      - FOK
    apiOrderType:
      type: string
      default: limit
      enum:
      - limit
      - market
      - stop
    apiOriginatingVaspForIntermediary:
      type: object
      properties:
        attest_verified_wallet_ownership:
          type: boolean
          description: "Required: user must attest that the wallet ownership was verified\
            \ by the originating VASP"
    apiOtcFillsReport:
      type: object
      properties:
        start_date:
          type: string
          description: Start date for items to be included in report.
          default: <30 days ago from end_date>
        end_date:
          type: string
          description: End date for items to be included in report
          default: <today>
        product_id:
          type: string
          description: Product - Which product to generate the report for
    apiPartialUser:
      required:
      - created_at
      - email
      - fulfills_new_requirements
      - has_default
      - id
      - is_banned
      - name
      - preferences
      - user_type
      type: object
      properties:
        id:
          type: string
        created_at:
          type: string
          format: date-time
        active_at:
          type: string
          format: date-time
        name:
          type: string
        email:
          type: string
        roles:
          type: array
          items:
            type: object
            properties: {}
        is_banned:
          type: boolean
        user_type:
          type: string
        fulfills_new_requirements:
          type: boolean
        flags:
          type: object
          additionalProperties:
            type: string
        details:
          type: object
          properties: {}
        preferences:
          type: object
          additionalProperties:
            type: object
            properties: {}
        has_default:
          type: boolean
        state_code:
          type: string
        cb_data_from_cache:
          type: boolean
        two_factor_method:
          type: string
        legal_name:
          type: string
        terms_accepted:
          type: string
          format: date-time
        has_clawback_payment_pending:
          type: boolean
        has_restricted_assets:
          type: boolean
    apiPaymentMethod:
      title: from https://github.cbhq.net/engineering/coinbase/blob/master/app/presenters/api/v2/payment_method_presenter.rb
      required:
      - created_at
      - currency
      - id
      - instant_buy
      - instant_sell
      - name
      - primary_buy
      - primary_sell
      - resource
      - resource_path
      - type
      - updated_at
      type: object
      properties:
        id:
          type: string
        type:
          type: string
        name:
          type: string
        currency:
          type: string
        primary_buy:
          type: boolean
        primary_sell:
          type: boolean
        instant_buy:
          type: boolean
        instant_sell:
          type: boolean
        created_at:
          type: string
          format: date-time
        updated_at:
          type: string
          format: date-time
        resource:
          type: string
        resource_path:
          type: string
        verified:
          type: boolean
        limits:
          $ref: '#/components/schemas/apiPaymentMethodLimits'
        allow_buy:
          type: boolean
        allow_sell:
          type: boolean
        allow_deposit:
          type: boolean
        allow_withdraw:
          type: boolean
        fiat_account:
          $ref: '#/components/schemas/apiMonorailLinkedResource'
        crypto_account:
          $ref: '#/components/schemas/apiMonorailLinkedResource'
        recurring_options:
          type: array
          items:
            $ref: '#/components/schemas/apiPaymentMethodRecurringOption'
        available_balance:
          $ref: '#/components/schemas/apiPaymentMethodAvailableBalance'
        picker_data:
          $ref: '#/components/schemas/apiPaymentMethodPickerData'
        hold_business_days:
          type: integer
          format: int64
        hold_days:
          type: integer
          format: int64
        verificationMethod:
          type: string
        cdvStatus:
          type: string
      example:
        id: cbdd9f28-34e7-5152-b1dc-d657bf8df858
        type: fiat_account
        name: Cash (USD)
        currency: USD
        primary_buy: true
        primary_sell: true
        instant_buy: true
        instant_sell: true
        created_at: 2019-06-04T21:24:32Z
        updated_at: 2019-06-04T21:24:32Z
        resource: payment_method
        resource_path: /v2/payment-methods/cbdd9f28-34e7-5152-b1dc-d657bf8df858
        limits:
          type: fiat_account
          name: Coinbase Account
        allow_buy: true
        allow_sell: true
        allow_deposit: false
        allow_withdraw: false
        fiat_account:
          id: 2b760113-fbba-5600-ac74-36482c130768
          resource: account
          resource_path: /v2/accounts/2b760113-fbba-5600-ac74-36482c130768
        verified: true
        picker_data:
          symbol: fiat_account
          balance:
            amount: "1.00"
            currency: USD
        hold_business_days: 0
        hold_days: 0
    apiPaymentMethodAvailableBalance:
      type: object
      properties:
        amount:
          type: string
        currency:
          type: string
        scale:
          type: string
    apiPaymentMethodLimits:
      type: object
      properties:
        type:
          type: string
        name:
          type: string
    apiPaymentMethodPickerData:
      title: from https://github.cbhq.net/engineering/coinbase/blob/c3e0852ff30323fe31ab265ca5f2389387a324dc/app/presenters/api/v2/payment_method_internal_presenter.rb
      type: object
      properties:
        symbol:
          type: string
        customer_name:
          type: string
        account_name:
          type: string
        account_number:
          type: string
        account_type:
          type: string
        institution_code:
          type: string
        institution_name:
          type: string
        iban:
          type: string
        swift:
          type: string
        paypal_email:
          type: string
        paypal_owner:
          type: string
        routing_number:
          type: string
        institution_identifier:
          type: string
        bank_name:
          type: string
        branch_name:
          type: string
        icon_url:
          type: string
        balance:
          $ref: '#/components/schemas/apiMonorailCurrencyAmount'
        cbit_wallet_address:
          type: string
    apiPaymentMethodRecurringOption:
      type: object
      properties:
        period:
          type: string
        label:
          type: string
    apiPaymentStatus:
      type: string
      default: STATUS_UNSPECIFIED
      enum:
      - STATUS_UNSPECIFIED
      - PAID_PAYMENT
      - PAYABLE_PAYMENT
      - OVERDUE_PAYMENT
    apiPostAddressBookResponse:
      type: object
      properties:
        body:
          type: array
          items:
            $ref: '#/components/schemas/apiAddressBookWhitelistedAddress'
    apiPostCoinbaseAccountAddressesRequest:
      type: object
      properties:
        account_id:
          type: string
        profile_id:
          type: string
        network:
          type: string
    apiPostCoinbaseAccountAddressesResponse:
      type: object
      properties:
        body:
          $ref: '#/components/schemas/apiCoinbaseAccountGeneratedDepositAddress'
    apiPostConversionRequest:
      required:
      - amount
      - from
      - to
      type: object
      properties:
        profile_id:
          type: string
        from:
          type: string
        to:
          type: string
        amount:
          type: string
        nonce:
          type: string
        idem:
          type: string
    apiPostConversionResponse:
      type: object
      properties:
        body:
          $ref: '#/components/schemas/apiConversion'
    apiPostCounterpartyTransferResponse:
      type: object
      properties:
        body:
          $ref: '#/components/schemas/apiCounterpartyTransferResult'
    apiPostDepositCoinbaseAccountResponse:
      type: object
      properties:
        id:
          type: string
        amount:
          type: string
        currency:
          type: string
    apiPostDepositPaymentMethodResponse:
      type: object
      properties:
        id:
          type: string
        amount:
          type: string
        currency:
          type: string
        payout_at:
          type: string
        fee:
          type: string
    apiPostFcmAutoLoanRequest:
      type: object
      properties:
        auto_loan:
          type: boolean
    apiPostFcmAutoLoanResponse:
      type: object
      properties:
        auto_loan:
          type: boolean
    apiPostFcmUsdcMarginRequest:
      type: object
      properties:
        enabled:
          type: boolean
    apiPostFcmUsdcMarginResponse:
      type: object
      properties:
        enabled:
          type: boolean
    apiPostOrdersRequest:
      required:
      - product_id
      - side
      type: object
      properties:
        profile_id:
          type: string
          description: "Create order on a specific `profile_id`. If none is passed,\
            \ defaults to `default` profile."
          default: default profile_id
        type:
          $ref: '#/components/schemas/apiOrderType'
        side:
          $ref: '#/components/schemas/apiOrderSide'
        product_id:
          type: string
          description: Book on which to place an order
        stp:
          $ref: '#/components/schemas/apiOrderStpFlag'
        stop:
          $ref: '#/components/schemas/apiOrderStop'
        stop_price:
          type: string
          description: Price threshold at which a `stop` order will be placed on the
            book
        price:
          type: string
          description: Price per unit of cryptocurrency - required for `limit`/`stop`
            orders
        size:
          type: string
          description: Amount of base currency to buy or sell - required for `limit`/`stop`
            orders and `market` `sell`s
        funds:
          type: string
          description: Amount of quote currency to buy - required for `market` `buy`s
        time_in_force:
          $ref: '#/components/schemas/apiOrderTimeInForce'
        cancel_after:
          $ref: '#/components/schemas/apiOrderCancelAfter'
        post_only:
          type: boolean
          description: "If true, order will only execute as a `maker` order"
          default: false
        client_oid:
          type: string
          description: Optional Order ID selected by the user or the frontend client
            to identify their order
        max_floor:
          type: string
          description: Placing an iceberg order. Use this to specify how much to show
        stop_limit_price:
          type: string
          description: Required for take profit/stop loss orders. Denotes the updated
            limit price upon the activation of the stop loss trigger
        is_synthetic:
          type: boolean
          description: If true, place a sell order for a synthetic product pair, e.g.
            `QNT-DASH` - see [Create a new order](/api-reference/exchange-api/rest-api/orders/create-new-order#synthetic-product-orders).
            When true, `stp` is required and must be `co` or `cn`; `dc` (the default)
            and `cb` are rejected.
          default: false
      example:
        price: "1"
        size: "10"
        type: limit
        side: buy
        product_id: BTC-USD
        client_oid: 496ffbba-7dae-4864-f7e8-a5bf52c6d0e2
        post_only: true
        max_floor: "4"
    apiPostOrdersResponse:
      type: object
      properties:
        body:
          $ref: '#/components/schemas/apiOrder'
    apiPostProfileRequest:
      type: object
      properties:
        name:
          type: string
    apiPostProfileResponse:
      type: object
      properties:
        body:
          $ref: '#/components/schemas/apiProfile'
    apiPostProfileTransferRequest:
      required:
      - amount
      - currency
      - from
      - to
      type: object
      properties:
        from:
          type: string
        to:
          type: string
        currency:
          type: string
        amount:
          type: string
      example:
        from: e543fd44-cbcd-4144-a2d9-6d81f42e2093
        to: 00921972-6b04-4daa-9458-3a38dd4924f6
        amount: "12.345"
        currency: BTC
    apiPostReportsRequest:
      required:
      - type
      type: object
      properties:
        type:
          type: string
          description: "Type of report to generate. Possible values: [`account`, `balance`,\
            \ `fills`, `otc-fills`, `rfq-fills`, `tax-invoice`, `1099k-transaction-history`]"
        year:
          type: string
          description: required for `1099k-transaction-history`-type reports
        format:
          $ref: '#/components/schemas/apiReportFormat'
        email:
          type: string
          description: Email to send generated report notification to
        profile_id:
          type: string
          description: "If this field is specified, it must be the `profile_id` that\
            \ is linked to the API key."
        balance:
          $ref: '#/components/schemas/apiBalanceReport'
        fills:
          $ref: '#/components/schemas/apiFillsReport'
        account:
          $ref: '#/components/schemas/apiAccountReport'
        otc_fills:
          $ref: '#/components/schemas/apiOtcFillsReport'
        tax_invoice:
          $ref: '#/components/schemas/apiTaxInvoiceReport'
        rfq_fills:
          $ref: '#/components/schemas/apiRfqFillsReport'
      example:
        type: account
        format: pdf
        email: user1@example.com
        profile_id: 8058d771-2d88-4f0f-ab6e-299c153d4308
        account:
          start_date: 2020-02-25T03:11:42.164Z
          end_date: 2020-03-26T02:11:42.164Z
          account_id: ALL
    apiPostReportsResponse:
      type: object
      properties:
        body:
          $ref: '#/components/schemas/apiReportCreateResult'
    apiPostTransferResponse:
      type: object
      properties:
        body:
          $ref: '#/components/schemas/apiTransferResult'
    apiPostTransferTravelRuleRequest:
      type: object
      properties:
        transfer_id:
          type: string
        originator_name:
          type: string
        originator_country:
          type: string
        vasp_id:
          type: string
        vasp_country:
          type: string
        lei_number:
          type: string
        business_address:
          $ref: '#/components/schemas/apiStreetAddress'
        wallet_type:
          $ref: '#/components/schemas/apiWalletType'
        is_self_certified:
          type: boolean
    apiPostTransferTravelRuleResponse:
      type: object
      properties:
        message:
          type: string
    apiPostTravelRuleRequest:
      type: object
      properties:
        address:
          type: string
          description: Crypto address where funds will be deposited from
        originator_name:
          type: string
          description: Name of the originator of the funds
        originator_country:
          type: string
          description: ISO 3166-1 alpha-2 formatted country code of the originator
            of the funds
        vasp_id:
          type: string
          description: VASP-uuid
        vasp_country:
          type: string
          description: ISO 3166-1 alpha-2 formatted country code of the VASP
        lei_number:
          type: string
          description: Legal Entity Identifier (LEI) of the VASP
        originator_address:
          $ref: '#/components/schemas/apiStreetAddress'
        wallet_type:
          $ref: '#/components/schemas/apiWalletType'
        is_self_certified:
          type: boolean
          description: True if the user owns the wallet
    apiPostTravelRuleResponse:
      type: object
      properties:
        body:
          $ref: '#/components/schemas/apiTravelRulePii'
    apiPostUserLevelSettlementPreferenceRequest:
      type: object
      properties:
        settlement_preference:
          type: string
          description: "Settlement preference (`USD`, `USDC`, `opt-out`)"
        user_id:
          type: string
          description: The ID of the user who owns the account
          default: self
    apiPostUserLevelSettlementPreferenceResponse:
      type: object
      properties:
        body:
          $ref: '#/components/schemas/apiUserLevelSettlementPreference'
    apiPostWithdrawCoinbaseAccountResponse:
      type: object
      properties:
        id:
          type: string
        amount:
          type: string
        currency:
          type: string
    apiPostWithdrawPaymentMethodResponse:
      type: object
      properties:
        id:
          type: string
        amount:
          type: string
        currency:
          type: string
        payout_at:
          type: string
        fee:
          type: string
    apiPostWrappedAssetsRedeemResponse:
      type: object
      properties:
        redeem:
          $ref: '#/components/schemas/apiRedeem'
    apiPostWrappedAssetsStakeWrapResponse:
      type: object
      properties:
        body:
          $ref: '#/components/schemas/apiStakeWrap'
    apiProduct:
      required:
      - auction_mode
      - base_currency
      - base_increment
      - cancel_only
      - display_name
      - id
      - limit_only
      - margin_enabled
      - min_market_funds
      - post_only
      - quote_currency
      - quote_increment
      - status
      - status_message
      type: object
      properties:
        id:
          type: string
        base_currency:
          type: string
        quote_currency:
          type: string
        quote_increment:
          type: string
          description: Min order price (a.k.a. price increment
        base_increment:
          type: string
        display_name:
          type: string
        min_market_funds:
          type: string
        margin_enabled:
          type: boolean
        post_only:
          type: boolean
        limit_only:
          type: boolean
        cancel_only:
          type: boolean
        status:
          $ref: '#/components/schemas/apiProductStatusEnum'
        status_message:
          type: string
        trading_disabled:
          type: boolean
        fx_stablecoin:
          type: boolean
        max_slippage_percentage:
          type: string
        auction_mode:
          type: boolean
        high_bid_limit_percentage:
          type: string
          description: Percentage to calculate highest price for limit buy order (Stable
            coin trading pair only)
      example:
        id: BTC-USD
        base_currency: BTC
        quote_currency: USD
        quote_increment: "0.01000000"
        base_increment: "0.00000001"
        display_name: BTC/USD
        min_market_funds: "10"
        margin_enabled: false
        post_only: false
        limit_only: false
        cancel_only: false
        status: online
        status_message: ""
        auction_mode: true
    apiProductBook:
      required:
      - asks
      - bids
      - sequence
      - time
      type: object
      properties:
        bids:
          type: array
          items:
            type: object
            properties: {}
        asks:
          type: array
          items:
            type: object
            properties: {}
        sequence:
          type: number
          format: double
        auction_mode:
          type: boolean
        auction:
          $ref: '#/components/schemas/apiAuctionBook'
        time:
          type: string
          format: date-time
      example:
        sequence: 13051505638
        bids:
        - - "6247.58"
          - "6.3578146"
          - 2
        asks:
        - - "6251.52"
          - "2"
          - 1
        time: 2021-02-12T01:09:23.334723Z
    apiProductStats:
      required:
      - high
      - last
      - low
      - open
      - volume
      type: object
      properties:
        open:
          type: string
        high:
          type: string
        low:
          type: string
        last:
          type: string
        volume:
          type: string
        volume_30day:
          type: string
        rfq_volume_24hour:
          type: string
        rfq_volume_30day:
          type: string
        conversions_volume_24hour:
          type: string
        conversions_volume_30day:
          type: string
      example:
        open: "5414.18000000"
        high: "6441.37000000"
        low: "5261.69000000"
        volume: "53687.76764233"
        last: "6250.02000000"
        volume_30day: "786763.72930864"
        rfq_volume_24hour: "78.23"
        conversions_volume_24hour: "0.000000"
        rfq_volume_30day: "0.000000"
        conversions_volume_30day: "0.000000"
    apiProductStatusEnum:
      type: string
      default: online
      enum:
      - online
      - offline
      - internal
      - delisted
    apiProductTicker:
      required:
      - ask
      - bid
      - price
      - size
      - time
      - trade_id
      - volume
      type: object
      properties:
        ask:
          type: string
        bid:
          type: string
        volume:
          type: string
        trade_id:
          type: integer
          format: int32
        price:
          type: string
        size:
          type: string
        time:
          type: string
          format: date-time
        rfq_volume:
          type: string
        conversions_volume:
          type: string
      example:
        trade_id: 86326522
        price: "6268.48"
        size: "0.00698254"
        time: 2020-03-20T00:22:57.833897Z
        bid: "6265.15"
        ask: "6267.71"
        volume: "53602.03940154"
        rfq_volume: "123.122"
        conversions_volume: "0.00"
    apiProductTrade:
      required:
      - price
      - side
      - size
      - time
      - trade_id
      type: object
      properties:
        trade_id:
          type: integer
          format: int32
        side:
          $ref: '#/components/schemas/apiOrderSide'
        size:
          type: string
        price:
          type: string
        time:
          type: string
          format: date-time
      example:
        time: 2020-03-20T00:36:59.86Z
        trade_id: 86327327
        price: "6225.32000000"
        size: "0.06469797"
        side: sell
    apiProductVolume:
      required:
      - base_currency
      - conversion_volume_24hour
      - conversion_volume_30day
      - display_name
      - id
      - market_types
      - quote_currency
      - rfq_volume_24hour
      - rfq_volume_30day
      - spot_volume_24hour
      - spot_volume_30day
      type: object
      properties:
        id:
          type: string
        base_currency:
          type: string
        quote_currency:
          type: string
        display_name:
          type: string
        market_types:
          type: array
          items:
            type: object
            properties: {}
        spot_volume_24hour:
          type: string
        spot_volume_30day:
          type: string
        rfq_volume_24hour:
          type: string
        rfq_volume_30day:
          type: string
        conversion_volume_24hour:
          type: string
        conversion_volume_30day:
          type: string
      example:
      - id: GALA-XYO
        base_currency: GALA
        quote_currency: XYO
        display_name: GALA-XYO
        market_types:
        - rfq
        spot_volume_24hour: ""
        spot_volume_30day: ""
        rfq_volume_24hour: "1232.2342"
        rfq_volume_30day: "2453232.2342"
        conversion_volume_24hour: "0"
        conversion_volume_30day: "0"
    apiProfile:
      required:
      - active
      - created_at
      - id
      - is_default
      - name
      - user_id
      type: object
      properties:
        id:
          type: string
        user_id:
          type: string
        name:
          type: string
        active:
          type: boolean
        is_default:
          type: boolean
        created_at:
          type: string
          format: date-time
      example:
        id: 8058d771-2d88-4f0f-ab6e-299c153d4308
        user_id: 5cf6e115aaf44503db300f1e
        name: default
        active: true
        is_default: true
        created_at: 2019-06-04T21:22:32.226461Z
    apiPublicPostAddressBookRequest:
      type: object
      properties:
        addresses:
          type: array
          description: List of addresses to add to the address book
          items:
            $ref: '#/components/schemas/apiAddressBookNewAddress'
      example:
        addresses:
        - label: my wallet
          to:
            address: 1JmYrFBLMSCLBwoL87gdQ5Qc9MLvb2egKk
          currency: BTC
        - label: my XRP wallet
          to:
            address: rEb8TK3gBgk5auZkwc6sHnwrGVJH8DuaLh
            destination_tag: "123"
          currency: XRP
    apiPublicPostDepositCoinbaseAccountRequest:
      required:
      - amount
      - coinbase_account_id
      - currency
      type: object
      properties:
        coinbase_account_id:
          type: string
        amount:
          type: string
        currency:
          type: string
    apiPublicPostDepositPaymentMethodRequest:
      required:
      - amount
      - currency
      - payment_method_id
      type: object
      properties:
        amount:
          type: string
        payment_method_id:
          type: string
        currency:
          type: string
    apiPublicPostTransferCounterpartyRequest:
      required:
      - amount
      - counterparty_id
      - currency
      type: object
      properties:
        amount:
          type: string
        counterparty_id:
          type: string
        currency:
          type: string
    apiPublicPostTransferCryptoRequest:
      required:
      - amount
      - crypto_address
      - currency
      type: object
      properties:
        profile_id:
          type: string
        amount:
          type: string
        currency:
          type: string
        crypto_address:
          type: string
        destination_tag:
          type: string
        no_destination_tag:
          type: boolean
        nonce:
          type: integer
          format: int32
        network:
          type: string
        add_network_fee_to_total:
          type: boolean
          description: "A boolean flag to add the network fee on top of the amount.\
            \ If this is blank, it will default to deducting the network fee from\
            \ the amount."
        is_intermediary:
          type: boolean
          description: "A boolean flag to create a transfer using Coinbase as an intermediary\
            \ VASP. If `true`, `intermediary_jurisdiction` must be provided. `travel_rule_data`\
            \ may be necessary if the jurisdiction requires data."
          default: false
        travel_rule_data:
          $ref: '#/components/schemas/apiTravelRulesData'
    apiPublicPostWithdrawCoinbaseAccountRequest:
      required:
      - amount
      - coinbase_account_id
      - currency
      type: object
      properties:
        coinbase_account_id:
          type: string
        amount:
          type: string
        currency:
          type: string
    apiPublicPostWithdrawPaymentMethodRequest:
      required:
      - amount
      - currency
      - payment_method_id
      type: object
      properties:
        amount:
          type: string
        payment_method_id:
          type: string
        currency:
          type: string
    apiPublicPostWrappedAssetRedeemRequest:
      title: |-
        Override PostWrappedAssetRedeemRequest with PublicPostWrappedAssetRedeemRequest in cloud.proto so we
        don't expose non-public to public facing documentation
      type: object
      properties:
        from_currency:
          type: string
        to_currency:
          type: string
        amount:
          type: string
        idem:
          type: string
    apiPublicPostWrappedAssetStakeWrapRequest:
      title: |-
        Override PostWrappedAssetStakeWrapRequest with PublicPostWrappedAssetStakeWrapRequest in cloud.proto so we
        don't expose non-public to public facing documentation
      type: object
      properties:
        from_currency:
          type: string
        to_currency:
          type: string
        amount:
          type: string
    apiPublicPutAddressBookEntryRequest:
      required:
      - id
      - label
      type: object
      properties:
        id:
          type: string
        label:
          type: string
        is_verified_self_hosted_wallet:
          type: boolean
          description: Flag to indicate if the crypto addresses has previously been
            digitally signed and verified when added in the Address Book UI tab
        vasp_id:
          type: string
          description: The VASP identifier if the address is owned by one of the supported
            Virtual Asset Service Providers
        business_name:
          type: string
          description: Business name
        business_country_code:
          type: string
          description: The country code (ISO 3166-1 alpha-2) of the originator's account
            location.
        is_certified_self_send:
          type: boolean
          description: Flag to indicate if the user owns the crypto address
        network:
          type: string
          description: "Blockchain network of the address. Provide a single network\
            \ name (e.g., `ethereum`, `bitcoin`, `_ALL_EVM_NETWORKS_`). If omitted\
            \ or `null`, the network field remains unchanged. Use `*` to make the\
            \ address available on all supported networks compatible with the asset\
            \ (e.g., both `ethereum` and `arbitrum` for an ERC-20 token). When `currency`\
            \ is `_ALL_ASSETS_`, `network` is required. Use `_ALL_EVM_NETWORKS_` only\
            \ with `_ALL_ASSETS_` to apply the address to all EVM-compatible networks."
        wallet_verification_network:
          type: string
          description: Blockchain network used to verify ownership of the wallet address
    apiPutAddressBookEntryResponse:
      type: object
      properties:
        body:
          $ref: '#/components/schemas/apiAddressBookWhitelistedAddress'
    apiPutProfileDeactivateRequest:
      required:
      - profile_id
      - to
      type: object
      properties:
        profile_id:
          type: string
        to:
          type: string
    apiPutProfileRequest:
      required:
      - name
      - profile_id
      type: object
      properties:
        profile_id:
          type: string
        name:
          type: string
    apiPutProfileResponse:
      type: object
      properties:
        body:
          $ref: '#/components/schemas/apiProfile'
    apiRedeem:
      required:
      - canceled_at
      - completed_at
      - conversion_rate
      - created_at
      - from_account_id
      - from_amount
      - from_currency
      - id
      - idem
      - status
      - to_account_id
      - to_amount
      - to_currency
      type: object
      properties:
        id:
          type: string
        from_amount:
          type: string
        to_amount:
          type: string
        from_account_id:
          type: string
        to_account_id:
          type: string
        from_currency:
          type: string
        to_currency:
          type: string
        status:
          type: string
        conversion_rate:
          type: string
        created_at:
          type: string
          format: date-time
        completed_at:
          type: string
          format: date-time
        canceled_at:
          type: string
          format: date-time
        idem:
          type: string
      example:
        id: c5aaf125-d99e-41fe-82ea-ad068038b278
        from_amount: "11.00000000"
        to_amount: "11.00000000"
        from_account_id: 5dcc143c-fb96-4f72-aebf-a165e3d29b53
        to_account_id: 6100247f-90fc-4335-ac17-d99839f0c909
        from_currency: USDC
        to_currency: USD
        status: pending
        conversion_rate: "1.006"
        created_at: 2019-06-11T22:11:56.382749Z
        completed_at: 2019-06-11T22:11:56.382749Z
        canceled_at: 2019-06-11T22:11:56.382749Z
        idem: 1c23a08a-8d09-4b6f-b549-985997bb5990
    apiRepayInterestRequest:
      type: object
      properties:
        idem:
          type: string
        from_profile_id:
          type: string
        currency:
          type: string
        native_amount:
          type: string
    apiRepayInterestResponse:
      type: object
      properties:
        repayment:
          $ref: '#/components/schemas/apiInterestRepayment'
    apiRepayPrincipalRequest:
      type: object
      properties:
        loan_id:
          type: string
        idem:
          type: string
        from_profile_id:
          type: string
        currency:
          type: string
        native_amount:
          type: string
    apiRepayPrincipalResponse:
      type: object
      properties:
        repayment:
          $ref: '#/components/schemas/apiRepayment'
    apiRepayment:
      type: object
      properties:
        id:
          type: string
        loan_id:
          type: string
        native_amount:
          type: string
        initial_native_amount:
          type: string
        status:
          $ref: '#/components/schemas/apiRepaymentStatus'
        type:
          $ref: '#/components/schemas/apiRepaymentType'
    apiRepaymentStatus:
      type: string
      default: REPAYMENT_UNSET
      enum:
      - REPAYMENT_UNSET
      - REPAYMENT_PENDING
      - REPAYMENT_COMPLETED
      - REPAYMENT_CANCELLED
      - REPAYMENT_EXPIRED
      - REPAYMENT_COMMITTED
      - REPAYMENT_REJECTED
    apiRepaymentType:
      type: string
      default: REPAYMENT_TYPE_UNSET
      enum:
      - REPAYMENT_TYPE_UNSET
      - PRINCIPAL_RETURN
      - PRINCIPAL_RECALL
      - INTEREST_PAYMENT
    apiReport:
      required:
      - completed_at
      - created_at
      - expires_at
      - file_url
      - id
      - params
      - status
      - type
      - user_id
      type: object
      properties:
        id:
          type: string
        type:
          type: string
        created_at:
          type: string
          format: date-time
        completed_at:
          type: string
          format: date-time
        expires_at:
          type: string
          format: date-time
        status:
          $ref: '#/components/schemas/apiReportReportStatus'
        user_id:
          type: string
        file_url:
          type: string
        params:
          $ref: '#/components/schemas/apiReportParams'
        file_count:
          type: string
          format: uint64
      example:
        created_at: 2019-07-25T22:14:00.410418Z
        completed_at: 2019-07-25T22:14:01.332Z
        expires_at: 2019-08-01T22:14:00.410418Z
        id: 66e2dc58-a11b-4ae7-af08-1b42cf8031ad
        type: account
        status: ready
        user_id: 5cf6e115aaf44503db300f1e
        file_url: www.example.com
        params:
          start_date: 2019-06-25T22:13:48.592Z
          end_date: 2019-07-25T22:13:48.592Z
          format: pdf
          product_id: ALL
          account_id: ALL
          profile_id: 8058d771-2d88-4f0f-ab6e-299c153d4308
          email: user1@example.com
          user:
            created_at: 2019-06-04T21:22:32.226461Z
            active_at: 2019-06-04T21:27:49.25Z
            id: 5cf6e115aaf44503db300f1e
            name: User One
            email: user1@example.com
            is_banned: false
            user_type: individual
            fulfills_new_requirements: true
            oauth_client: pro
            preferences:
              preferred_market: BTC-USD
              margin_terms_completed_in_utc: 2019-06-13T23:40:17.7520+00:00
              margin_tutorial_completed_in_utc: 2019-06-19T23:56:59.4110+00:00
            has_default: false
          new_york_state: false
    apiReportCreateResult:
      required:
      - id
      - status
      - type
      type: object
      properties:
        id:
          type: string
        type:
          type: string
        status:
          $ref: '#/components/schemas/apiReportCreateResultReportStatus'
    apiReportCreateResultReportStatus:
      type: string
      default: pending
      enum:
      - pending
    apiReportFormat:
      type: string
      default: pdf
      enum:
      - pdf
      - csv
    apiReportParams:
      required:
      - email
      - format
      - profile_id
      - user
      type: object
      properties:
        start_date:
          type: string
          format: date-time
        end_date:
          type: string
          format: date-time
        format:
          $ref: '#/components/schemas/apiReportFormat'
        product_id:
          type: string
        account_id:
          type: string
        profile_id:
          type: string
        email:
          type: string
        user:
          $ref: '#/components/schemas/apiPartialUser'
        new_york_state:
          type: boolean
        datetime:
          type: string
          format: date-time
        group_by_profile:
          type: boolean
      example:
        start_date: 2019-06-25T22:13:48.592Z
        end_date: 2019-07-25T22:13:48.592Z
        format: pdf
        product_id: ALL
        account_id: ALL
        profile_id: 8058d771-2d88-4f0f-ab6e-299c153d4308
        email: user1@example.com
        user:
          created_at: 2019-06-04T21:22:32.226461Z
          active_at: 2019-06-04T21:27:49.25Z
          id: 5cf6e115aaf44503db300f1e
          name: User One
          email: user1@example.com
          is_banned: false
          user_type: individual
          fulfills_new_requirements: true
          oauth_client: pro
          preferences:
            preferred_market: BTC-USD
            margin_terms_completed_in_utc: 2019-06-13T23:40:17.7520+00:00
            margin_tutorial_completed_in_utc: 2019-06-19T23:56:59.4110+00:00
          has_default: false
        new_york_state: false
    apiReportReportStatus:
      type: string
      default: pending
      enum:
      - pending
      - creating
      - ready
      - failed
    apiRfqFillsReport:
      type: object
      properties:
        start_date:
          type: string
          description: Start date for items to be included in report.
          default: <30 days ago from end_date>
        end_date:
          type: string
          description: End date for items to be included in report
          default: <today>
        product_id:
          type: string
          description: Product - Which product to generate the report for
    apiShareAddressInfo:
      type: object
      properties:
        line1:
          type: string
        line2:
          type: string
    apiStakeWrap:
      required:
      - canceled_at
      - completed_at
      - conversion_rate
      - created_at
      - from_account_id
      - from_amount
      - from_currency
      - id
      - status
      - to_account_id
      - to_amount
      - to_currency
      type: object
      properties:
        id:
          type: string
        from_amount:
          type: string
        to_amount:
          type: string
        from_account_id:
          type: string
        to_account_id:
          type: string
        from_currency:
          type: string
        to_currency:
          type: string
        status:
          type: string
        conversion_rate:
          type: string
        created_at:
          type: string
          format: date-time
        completed_at:
          type: string
          format: date-time
        canceled_at:
          type: string
          format: date-time
      example:
        id: c5aaf125-d99e-41fe-82ea-ad068038b278
        from_amount: "11.00000000"
        to_amount: "11.00000000"
        from_account_id: 5dcc143c-fb96-4f72-aebf-a165e3d29b53
        to_account_id: 6100247f-90fc-4335-ac17-d99839f0c909
        from_currency: USDC
        to_currency: USD
        status: pending
        conversion_rate: "1.006"
        created_at: 2019-06-11T22:11:56.382749Z
        completed_at: 2019-06-11T22:11:56.382749Z
        canceled_at: 2019-06-11T22:11:56.382749Z
    apiStreetAddress:
      type: object
      properties:
        address_1:
          type: string
        address_2:
          type: string
        address_3:
          type: string
        city:
          type: string
        state:
          type: string
        country:
          type: string
          description: ISO 3166-1 alpha-2 country code.
        postal_code:
          type: string
    apiTaxInvoiceReport:
      type: object
      properties:
        start_date:
          type: string
          description: Start date for items to be included in report.
          default: <30 days ago from end_date>
        end_date:
          type: string
          description: End date for items to be included in report
          default: <today>
        product_id:
          type: string
          description: Product - Which product to generate the report for
    apiTransfer:
      required:
      - amount
      - canceled_at
      - completed_at
      - created_at
      - currency
      - details
      - id
      - processed_at
      - type
      - user_nonce
      type: object
      properties:
        id:
          type: string
        type:
          $ref: '#/components/schemas/apiTransferType'
        created_at:
          type: string
          format: date-time
        completed_at:
          type: string
          format: date-time
        canceled_at:
          type: string
          format: date-time
        processed_at:
          type: string
          format: date-time
        amount:
          type: string
        details:
          type: object
          additionalProperties:
            type: string
        user_nonce:
          type: string
          format: int64
        currency:
          type: string
      example:
        id: 19ac524d-8827-4246-a1b2-18dc5ca9472c
        type: withdraw
        created_at: 2020-03-12 00:14:12.397805+00
        completed_at: 2020-03-12 00:14:13.021626+00
        amount: "1.00000000"
        details:
          coinbase_account_id: 2b760113-fbba-5600-ac74-36482c130768
          coinbase_transaction_id: 5e697ed49f8417148f3366ea
          coinbase_payment_method_id: ""
        currency: USD
    apiTransferResult:
      type: object
      properties:
        id:
          type: string
        amount:
          type: string
        currency:
          type: string
        payout_at:
          type: string
        fee:
          type: string
        subtotal:
          type: string
    apiTransferType:
      type: string
      default: deposit
      enum:
      - deposit
      - withdraw
      - internal_deposit
      - internal_withdraw
    apiTravelRulePii:
      type: object
      properties:
        id:
          type: string
          description: Travel rule identifier
        created_at:
          type: string
          description: Timestamp of when entry was added
          format: date-time
        address:
          type: string
          description: Crypto address where funds will be deposited from
        originator_name:
          type: string
          description: Name of the originator of the funds
        originator_country:
          type: string
          description: country code (ISO 3166-1 alpha-2) of the originator of the
            funds
        vasp_id:
          type: string
          description: VASP-uuid
        vasp_country:
          type: string
          description: ISO 3166-1 alpha-2 formatted country code of the VASP
        lei_number:
          type: string
          description: Legal Entity Identifier (LEI) of the VASP
        originator_address:
          $ref: '#/components/schemas/apiStreetAddress'
    apiTravelRulesData:
      type: object
      properties:
        originator_name:
          type: string
          description: "Required: name of the originator sending the funds"
        originator_natural_name:
          $ref: '#/components/schemas/apiTravelRulesNaturalName'
        originator_address:
          $ref: '#/components/schemas/apiStreetAddress'
        originator_telephone_number:
          type: string
        originator_account:
          type: string
          description: An account identifier for the originator.
        originator_account_location_country_code:
          type: string
          description: The country code (ISO 3166-1 alpha-2) of the originator's account
            location.
        originator_date_of_birth:
          $ref: '#/components/schemas/apiDate'
        originator_account_number:
          type: string
          description: "Required: account number of the originator sending the funds."
        transfer_purpose:
          type: string
          description: The purpose of the transfer.
        beneficiary_name:
          type: string
          description: "Required: name of the beneficiary receiving the funds"
        beneficiary_address:
          $ref: '#/components/schemas/apiStreetAddress'
        beneficiary_telephone_number:
          type: string
          description: The telephone number of the beneficiary.
        beneficiary_account_location:
          type: string
          description: The country code (ISO 3166-1 alpha-2) of the beneficiary's
            account location.
        beneficiary_date_of_birth:
          $ref: '#/components/schemas/apiDate'
        beneficiary_financial_institution:
          type: string
          description: "The beneficiary financial institution, e.g. Coinbase."
        is_self:
          type: boolean
          description: "Required: whether the user claims the receiving wallet belongs\
            \ to the originator"
        originator_wallet_address:
          type: string
          description: The crypto address of the originator.
        originating_vasp_for_intermediary:
          $ref: '#/components/schemas/apiOriginatingVaspForIntermediary'
    apiTravelRulesNaturalName:
      type: object
      properties:
        first_name:
          type: string
        last_name:
          type: string
    apiUnauthorizedResponse:
      type: object
      properties:
        message:
          title: message
          pattern: "^[a-zA-Z0-9]{1, 32}$"
          type: string
      description: |-
        UnauthorizedResponse is the response message for endpoints in rest-gateway that requires authentication.
        This message is used to generate the Exchange REST API documentation using OpenAPI format.
    apiUserAggregatedData:
      type: object
      properties:
        start_date:
          type: string
        end_date:
          type: string
        maker_volume_notional_usd:
          type: string
        maker_volume_relative_percentage:
          type: string
        taker_volume_notional_usd:
          type: string
        taker_volume_relative_percentage:
          type: string
        total_exchange_volume_notional_usd:
          type: string
        total_exchange_volume_relative_percentage:
          type: string
        maker_rank:
          type: string
        taker_rank:
          type: string
        total_exchange_volume_rank:
          type: string
        adjusted_maker_volume_notional_usd:
          type: string
        adjusted_maker_volume_relative_percentage:
          type: string
        adjusted_total_exchange_volume_notional_usd:
          type: string
        adjusted_total_exchange_volume_relative_percentage:
          type: string
        adjusted_maker_volume_rank:
          type: string
        adjusted_total_exchange_volume_rank:
          type: string
        liquidity_program_tier:
          type: string
        next_liquidity_program_tier:
          type: string
    apiUserExchangeTransferLimits:
      required:
      - limit_currency
      - transfer_limits
      type: object
      properties:
        transfer_limits:
          $ref: '#/components/schemas/apiUserExchangeTransferLimitsEntry'
        limit_currency:
          type: string
      example:
        limit_currency: USD
        transfer_limits:
          exchange_withdraw:
            MANA:
              max: "391282.23187385"
              remaining: "391282.23187385"
              period_in_days: 7
            ALGO:
              max: "59844.404548"
              remaining: "59844.404548"
              period_in_days: 7
            ATOM:
              max: "4624.277457"
              remaining: "4624.277457"
              period_in_days: 7
            KNC:
              max: "21584.28663933"
              remaining: "21584.28663933"
              period_in_days: 7
    apiUserExchangeTransferLimitsEntry:
      required:
      - exchange_withdraw
      type: object
      properties:
        exchange_withdraw:
          type: object
          additionalProperties:
            $ref: '#/components/schemas/apiUserExchangeTransferLimitsForCurrency'
      example:
        exchange_withdraw:
          MANA:
            max: "391282.23187385"
            remaining: "391282.23187385"
            period_in_days: 7
          ALGO:
            max: "59844.404548"
            remaining: "59844.404548"
            period_in_days: 7
          ATOM:
            max: "4624.277457"
            remaining: "4624.277457"
            period_in_days: 7
          KNC:
            max: "21584.28663933"
            remaining: "21584.28663933"
            period_in_days: 7
    apiUserExchangeTransferLimitsForCurrency:
      required:
      - max
      - period_in_days
      - remaining
      type: object
      properties:
        period_in_days:
          type: integer
          format: int64
        remaining:
          type: string
        max:
          type: string
      example:
        max: "391282.23187385"
        remaining: "391282.23187385"
        period_in_days: 7
    apiUserIndividualData:
      type: object
      properties:
        start_date:
          type: string
        end_date:
          type: string
        maker_volume_notional_usd:
          type: string
        maker_volume_relative_percentage:
          type: string
        taker_volume_notional_usd:
          type: string
        taker_volume_relative_percentage:
          type: string
        total_exchange_volume_notional_usd:
          type: string
        total_exchange_volume_relative_percentage:
          type: string
        maker_rank:
          type: string
        taker_rank:
          type: string
        total_exchange_volume_rank:
          type: string
        adjusted_maker_volume_notional_usd:
          type: string
        adjusted_maker_volume_relative_percentage:
          type: string
        adjusted_total_exchange_volume_notional_usd:
          type: string
        adjusted_total_exchange_volume_relative_percentage:
          type: string
        adjusted_maker_volume_rank:
          type: string
        adjusted_total_exchange_volume_rank:
          type: string
    apiUserLevelSettlementPreference:
      type: object
      properties:
        settlement_preference:
          type: string
    apiWalletType:
      type: string
      default: UNKNOWN_WALLET_TYPE
      enum:
      - UNKNOWN_WALLET_TYPE
      - EXCHANGE
      - SELF_HOSTED
    apiWrappedAsset:
      required:
      - apy
      - circulating_supply
      - conversion_rate
      - id
      - redeem_time_estimate_days
      - total_supply
      type: object
      properties:
        id:
          type: string
          description: The symbol of the wrapped asset
        circulating_supply:
          type: string
          description: The assets wrapped by customers less the assets unwrapped by
            customers existing outside of Coinbase's premint account
        total_supply:
          type: string
          description: The total token supply of the asset matching that on Etherscan
        conversion_rate:
          type: string
          description: The conversion rate between the wrapped asset and the underlying
            asset
        apy:
          type: string
          description: The APY earned by the supply of the underlying asset
        redeem_time_estimate_days:
          type: string
          description: The estimated time to redeem the wrapped asset in days
      example:
        id: CBETH
        circulating_supply: "221127.7137774658"
        total_supply: "926714.1251656958084"
        conversion_rate: "1.006081377449935752"
        apy: "0.0384"
        redeem_time_estimate_days: "12.34"
    apiWrappedAssetConversionRate:
      required:
      - amount
      type: object
      properties:
        amount:
          type: string
      example:
        amount: "1.006081377449935752"
    apiWrappedAssets:
      required:
      - wrapped_assets
      type: object
      properties:
        wrapped_assets:
          type: array
          items:
            $ref: '#/components/schemas/apiWrappedAsset'
      example:
        wrapped_assets:
        - id: CBETH
          circulating_supply: "221127.7137774658"
          total_supply: "926714.1251656958084"
          conversion_rate: "1.006081377449935752"
          apy: "0.0384"
    protobufNullValue:
      type: string
      description: |-
        `NullValue` is a singleton enumeration to represent the null value for the
        `Value` type union.

        The JSON representation for `NullValue` is JSON `null`.

         - NULL_VALUE: Null value.
      default: NULL_VALUE
      enum:
      - NULL_VALUE
  securitySchemes:
    ApiKeyAuthKey:
      type: apiKey
      name: cb-access-key
      in: header
    ApiKeyAuthPassphrase:
      type: apiKey
      name: cb-access-passphrase
      in: header
    ApiKeyAuthSign:
      type: apiKey
      name: cb-access-sign
      in: header
    ApiKeyAuthTimestamp:
      type: apiKey
      name: cb-access-timestamp
      in: header
x-original-swagger-version: "2.0"
