openapi: 3.0.0
info:
  title: Coinbase Advanced Trade API
  version: '0.1'
paths:
  /api/v3/brokerage/accounts:
    get:
      summary: List Accounts
      description: Get a list of authenticated accounts for the current user.
      operationId: RetailBrokerageApi_GetAccounts
      responses:
        '200':
          description: A successful response.
          content:
            application/json:
              schema:
                $ref: >-
                  #/components/schemas/coinbase.public_api.authed.retail_brokerage_api.GetAccountsResponse
            text/event-stream:
              schema:
                $ref: >-
                  #/components/schemas/coinbase.public_api.authed.retail_brokerage_api.GetAccountsResponse
        default:
          description: An unexpected error response.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/grpc.gateway.runtime.Error'
            text/event-stream:
              schema:
                $ref: '#/components/schemas/grpc.gateway.runtime.Error'
      parameters:
        - name: limit
          description: >-
            The number of accounts to display per page. By default, displays 49
            (max 250). If `has_next` is true, additional pages of accounts are
            available to be fetched. Use the `cursor` parameter to start on a
            specified page.
          in: query
          required: false
          schema:
            type: integer
            format: int32
        - name: cursor
          description: >-
            For paginated responses, returns all responses that come after this
            value.
          in: query
          required: false
          schema:
            type: string
        - name: retail_portfolio_id
          description: >-
            **(Deprecated)** Only returns the accounts matching the portfolio
            ID. Only applicable for legacy keys. CDP keys will default to the
            key's permissioned portfolio.
          in: query
          required: false
          schema:
            type: string
      tags:
        - Accounts
  /api/v3/brokerage/accounts/{account_uuid}:
    get:
      summary: Get Account
      description: Get a list of information about an account, given an account UUID.
      operationId: RetailBrokerageApi_GetAccount
      responses:
        '200':
          description: A successful response.
          content:
            application/json:
              schema:
                $ref: >-
                  #/components/schemas/coinbase.public_api.authed.retail_brokerage_api.GetAccountResponse
            text/event-stream:
              schema:
                $ref: >-
                  #/components/schemas/coinbase.public_api.authed.retail_brokerage_api.GetAccountResponse
        default:
          description: An unexpected error response.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/grpc.gateway.runtime.Error'
            text/event-stream:
              schema:
                $ref: '#/components/schemas/grpc.gateway.runtime.Error'
      parameters:
        - name: account_uuid
          description: The account's UUID.
          in: path
          required: true
          schema:
            type: string
      tags:
        - Accounts
  /api/v3/brokerage/best_bid_ask:
    get:
      summary: Get Best Bid/Ask
      description: >-
        Get the best bid/ask for all products. A subset of all products can be
        returned instead by using the product_ids input.
      operationId: RetailBrokerageApi_GetBestBidAsk
      responses:
        '200':
          description: A successful response.
          content:
            application/json:
              schema:
                $ref: >-
                  #/components/schemas/coinbase.public_api.authed.retail_brokerage_api.GetBestBidAskResponse
            text/event-stream:
              schema:
                $ref: >-
                  #/components/schemas/coinbase.public_api.authed.retail_brokerage_api.GetBestBidAskResponse
        default:
          description: An unexpected error response.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/grpc.gateway.runtime.Error'
            text/event-stream:
              schema:
                $ref: '#/components/schemas/grpc.gateway.runtime.Error'
      parameters:
        - name: product_ids
          description: The list of trading pairs (e.g. 'BTC-USD').
          in: query
          required: false
          explode: true
          schema:
            type: array
            items:
              type: string
      tags:
        - Products
  /api/v3/brokerage/product_book:
    get:
      summary: Get Product Book
      description: >-
        Get a list of bids/asks for a single product. The amount of detail shown
        can be customized with the limit parameter.
      operationId: RetailBrokerageApi_GetProductBook
      responses:
        '200':
          description: A successful response.
          content:
            application/json:
              schema:
                $ref: >-
                  #/components/schemas/coinbase.public_api.authed.retail_brokerage_api.GetProductBookResponse
            text/event-stream:
              schema:
                $ref: >-
                  #/components/schemas/coinbase.public_api.authed.retail_brokerage_api.GetProductBookResponse
        default:
          description: An unexpected error response.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/grpc.gateway.runtime.Error'
            text/event-stream:
              schema:
                $ref: '#/components/schemas/grpc.gateway.runtime.Error'
      parameters:
        - name: product_id
          description: The trading pair (e.g. 'BTC-USD').
          in: query
          required: true
          schema:
            type: string
        - name: limit
          description: 'The number of bid/asks to be returned. '
          in: query
          required: false
          schema:
            type: integer
            format: int32
        - name: aggregation_price_increment
          description: >-
            The minimum price intervals at which buy and sell orders are grouped
            or combined in the order book.
          in: query
          required: false
          schema:
            type: string
      tags:
        - Products
  /api/v3/brokerage/products:
    get:
      summary: List Products
      description: Get a list of the available currency pairs for trading.
      operationId: RetailBrokerageApi_GetProducts
      responses:
        '200':
          description: A successful response.
          content:
            application/json:
              schema:
                $ref: >-
                  #/components/schemas/coinbase.public_api.authed.retail_brokerage_api.Products
            text/event-stream:
              schema:
                $ref: >-
                  #/components/schemas/coinbase.public_api.authed.retail_brokerage_api.Products
        default:
          description: An unexpected error response.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/grpc.gateway.runtime.Error'
            text/event-stream:
              schema:
                $ref: '#/components/schemas/grpc.gateway.runtime.Error'
      parameters:
        - name: limit
          description: The number of products to be returned.
          in: query
          required: false
          schema:
            type: integer
            format: int32
        - name: offset
          description: The number of products to skip before returning.
          in: query
          required: false
          schema:
            type: integer
            format: int32
        - name: product_type
          description: >-
            Only returns the orders matching this product type. By default,
            returns all product types.
          in: query
          required: false
          schema:
            type: string
            enum:
              - UNKNOWN_PRODUCT_TYPE
              - SPOT
              - FUTURE
            default: UNKNOWN_PRODUCT_TYPE
        - name: product_ids
          description: The list of trading pairs (e.g. 'BTC-USD').
          in: query
          required: false
          explode: true
          schema:
            type: array
            items:
              type: string
        - name: contract_expiry_type
          description: >-
            Only returns the orders matching the contract expiry type. Only
            applicable if product_type is set to FUTURE.
          in: query
          required: false
          schema:
            type: string
            enum:
              - UNKNOWN_CONTRACT_EXPIRY_TYPE
              - EXPIRING
              - PERPETUAL
            default: UNKNOWN_CONTRACT_EXPIRY_TYPE
        - name: expiring_contract_status
          description: Only returns contracts with this status (default is UNEXPIRED).
          in: query
          required: false
          schema:
            type: string
            enum:
              - UNKNOWN_EXPIRING_CONTRACT_STATUS
              - STATUS_UNEXPIRED
              - STATUS_EXPIRED
              - STATUS_ALL
            default: UNKNOWN_EXPIRING_CONTRACT_STATUS
        - name: get_tradability_status
          description: >-
            Whether or not to populate view_only with the tradability status of
            the product. This is only enabled for SPOT products.
          in: query
          required: false
          schema:
            type: boolean
        - name: get_all_products
          description: >-
            If true, return all products of all product types (including expired
            futures contracts).
          in: query
          required: false
          schema:
            type: boolean
        - name: products_sort_order
          description: >-
            The order in which products are returned. By default, products are
            returned in 24 hour volume descending (in quote).
          in: query
          required: false
          schema:
            type: string
            enum:
              - PRODUCTS_SORT_ORDER_UNDEFINED
              - PRODUCTS_SORT_ORDER_VOLUME_24H_DESCENDING
              - PRODUCTS_SORT_ORDER_LIST_TIME_DESCENDING
            default: PRODUCTS_SORT_ORDER_UNDEFINED
        - name: cursor
          description: >-
            The cursor to use for pagination. This will be a base64 encoded
            string that decodes into the last productId of the previously
            returned page
          in: query
          required: false
          schema:
            type: string
        - name: futures_underlying_type
          description: >-
            Only returns the products matching the underlying type. Only
            applicable if product_type is set to FUTURE.
          in: query
          required: false
          schema:
            type: string
            enum:
              - UNKNOWN_FUTURES_UNDERLYING_TYPE
              - FUTURES_UNDERLYING_TYPE_SPOT
              - FUTURES_UNDERLYING_TYPE_INDEX
              - FUTURES_UNDERLYING_TYPE_EQUITY
              - FUTURES_UNDERLYING_TYPE_EQUITY_INDEX
              - FUTURES_UNDERLYING_TYPE_EQUITY_ETF
              - FUTURES_UNDERLYING_TYPE_PREIPO
              - FUTURES_UNDERLYING_TYPE_COMMOD
              - FUTURES_UNDERLYING_TYPE_COMMOD_ETF
              - FUTURES_UNDERLYING_TYPE_COMMOD_INDEX
              - FUTURES_UNDERLYING_TYPE_ADR
              - FUTURES_UNDERLYING_TYPE_FOREIGN_EQUITY
              - FUTURES_UNDERLYING_TYPE_OTC
            default: UNKNOWN_FUTURES_UNDERLYING_TYPE
        - name: user_country_code
          description: >-
            The country code of the user. This is used to provide differentiated
            product display names.
          in: query
          required: false
          schema:
            type: string
      tags:
        - Products
  /api/v3/brokerage/products/{product_id}:
    get:
      summary: Get Product
      description: Get information on a single product by product ID.
      operationId: RetailBrokerageApi_GetProduct
      responses:
        '200':
          description: A successful response.
          content:
            application/json:
              schema:
                $ref: >-
                  #/components/schemas/coinbase.public_api.authed.retail_brokerage_api.Product
            text/event-stream:
              schema:
                $ref: >-
                  #/components/schemas/coinbase.public_api.authed.retail_brokerage_api.Product
        default:
          description: An unexpected error response.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/grpc.gateway.runtime.Error'
            text/event-stream:
              schema:
                $ref: '#/components/schemas/grpc.gateway.runtime.Error'
      parameters:
        - name: product_id
          description: The trading pair (e.g. 'BTC-USD').
          in: path
          required: true
          schema:
            type: string
        - name: get_tradability_status
          description: >-
            Whether or not to populate view_only with the tradability status of
            the product. This is only enabled for SPOT products.
          in: query
          required: false
          schema:
            type: boolean
      tags:
        - Products
  /api/v3/brokerage/products/{product_id}/candles:
    get:
      summary: Get Product Candles
      description: Get rates for a single product by product ID, grouped in buckets.
      operationId: RetailBrokerageApi_GetCandles
      responses:
        '200':
          description: A successful response.
          content:
            application/json:
              schema:
                $ref: >-
                  #/components/schemas/coinbase.public_api.authed.retail_brokerage_api.Candles
            text/event-stream:
              schema:
                $ref: >-
                  #/components/schemas/coinbase.public_api.authed.retail_brokerage_api.Candles
        default:
          description: An unexpected error response.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/grpc.gateway.runtime.Error'
            text/event-stream:
              schema:
                $ref: '#/components/schemas/grpc.gateway.runtime.Error'
      parameters:
        - name: product_id
          description: The trading pair (e.g. 'BTC-USD').
          in: path
          required: true
          schema:
            type: string
        - name: start
          description: The UNIX timestamp indicating the start of the time interval.
          in: query
          required: true
          schema:
            type: string
        - name: end
          description: The UNIX timestamp indicating the end of the time interval.
          in: query
          required: true
          schema:
            type: string
        - name: granularity
          description: The timeframe each candle represents.
          in: query
          required: true
          schema:
            type: string
            enum:
              - UNKNOWN_GRANULARITY
              - ONE_MINUTE
              - FIVE_MINUTE
              - FIFTEEN_MINUTE
              - THIRTY_MINUTE
              - ONE_HOUR
              - TWO_HOUR
              - FOUR_HOUR
              - SIX_HOUR
              - ONE_DAY
            default: UNKNOWN_GRANULARITY
        - name: limit
          description: >-
            The number of candle buckets to be returned. By default, returns 350
            (max 350).
          in: query
          required: false
          schema:
            type: integer
            format: int32
      tags:
        - Products
  /api/v3/brokerage/products/{product_id}/ticker:
    get:
      summary: Get Market Trades
      description: >-
        Get snapshot information by product ID about the last trades (ticks) and
        best bid/ask.
      operationId: RetailBrokerageApi_GetMarketTrades
      responses:
        '200':
          description: A successful response.
          content:
            application/json:
              schema:
                $ref: >-
                  #/components/schemas/coinbase.public_api.authed.retail_brokerage_api.GetMarketTradesResponse
            text/event-stream:
              schema:
                $ref: >-
                  #/components/schemas/coinbase.public_api.authed.retail_brokerage_api.GetMarketTradesResponse
        default:
          description: An unexpected error response.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/grpc.gateway.runtime.Error'
            text/event-stream:
              schema:
                $ref: '#/components/schemas/grpc.gateway.runtime.Error'
      parameters:
        - name: product_id
          description: The trading pair (e.g. 'BTC-USD').
          in: path
          required: true
          schema:
            type: string
        - name: limit
          description: 'The number of trades to be returned. '
          in: query
          required: true
          schema:
            type: integer
            format: int32
        - name: start
          description: The UNIX timestamp indicating the start of the time interval.
          in: query
          required: false
          schema:
            type: string
        - name: end
          description: The UNIX timestamp indicating the end of the time interval.
          in: query
          required: false
          schema:
            type: string
      tags:
        - Products
  /api/v3/brokerage/orders:
    post:
      summary: Create Order
      description: >-
        Create an order with a specified `product_id` (asset-pair), `side`
        (buy/sell), etc.
      operationId: RetailBrokerageApi_PostOrder
      responses:
        '200':
          description: A successful response.
          content:
            application/json:
              schema:
                $ref: >-
                  #/components/schemas/coinbase.public_api.authed.retail_brokerage_api.NewOrderResponse
            text/event-stream:
              schema:
                $ref: >-
                  #/components/schemas/coinbase.public_api.authed.retail_brokerage_api.NewOrderResponse
        default:
          description: An unexpected error response.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/grpc.gateway.runtime.Error'
            text/event-stream:
              schema:
                $ref: '#/components/schemas/grpc.gateway.runtime.Error'
      requestBody:
        content:
          application/json:
            schema:
              $ref: >-
                #/components/schemas/coinbase.public_api.authed.retail_brokerage_api.NewOrderRequest
        required: true
      tags:
        - Orders
  /api/v3/brokerage/orders/batch_cancel:
    post:
      summary: Cancel Orders
      description: Initiate cancel requests for one or more orders.
      operationId: RetailBrokerageApi_CancelOrders
      responses:
        '200':
          description: A successful response.
          content:
            application/json:
              schema:
                $ref: >-
                  #/components/schemas/coinbase.public_api.authed.retail_brokerage_api.CancelOrdersResponse
            text/event-stream:
              schema:
                $ref: >-
                  #/components/schemas/coinbase.public_api.authed.retail_brokerage_api.CancelOrdersResponse
        default:
          description: An unexpected error response.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/grpc.gateway.runtime.Error'
            text/event-stream:
              schema:
                $ref: '#/components/schemas/grpc.gateway.runtime.Error'
      requestBody:
        content:
          application/json:
            schema:
              $ref: >-
                #/components/schemas/coinbase.public_api.authed.retail_brokerage_api.CancelOrdersRequest
        required: true
      tags:
        - Orders
  /api/v3/brokerage/orders/edit:
    post:
      summary: Edit Order
      description: Edit an order with a specified new `size`, or new `price`.
      operationId: RetailBrokerageApi_EditOrder
      responses:
        '200':
          description: A successful response.
          content:
            application/json:
              schema:
                $ref: >-
                  #/components/schemas/coinbase.public_api.authed.retail_brokerage_api.EditOrderResponse
            text/event-stream:
              schema:
                $ref: >-
                  #/components/schemas/coinbase.public_api.authed.retail_brokerage_api.EditOrderResponse
        default:
          description: An unexpected error response.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/grpc.gateway.runtime.Error'
            text/event-stream:
              schema:
                $ref: '#/components/schemas/grpc.gateway.runtime.Error'
      requestBody:
        $ref: >-
          #/components/requestBodies/coinbase.public_api.authed.retail_brokerage_api.EditOrderRequest
      tags:
        - Orders
  /api/v3/brokerage/orders/edit_preview:
    post:
      summary: Edit Order Preview
      description: >-
        Preview an edit order request with a specified new `size`, or new
        `price`.
      operationId: RetailBrokerageApi_PreviewEditOrder
      responses:
        '200':
          description: A successful response.
          content:
            application/json:
              schema:
                $ref: >-
                  #/components/schemas/coinbase.public_api.authed.retail_brokerage_api.PreviewEditOrderResponse
            text/event-stream:
              schema:
                $ref: >-
                  #/components/schemas/coinbase.public_api.authed.retail_brokerage_api.PreviewEditOrderResponse
        default:
          description: An unexpected error response.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/grpc.gateway.runtime.Error'
            text/event-stream:
              schema:
                $ref: '#/components/schemas/grpc.gateway.runtime.Error'
      requestBody:
        $ref: >-
          #/components/requestBodies/coinbase.public_api.authed.retail_brokerage_api.EditOrderRequest
      tags:
        - Orders
  /api/v3/brokerage/orders/historical/batch:
    get:
      summary: List Orders
      description: >-
        Get a list of orders filtered by optional query parameters
        (`product_id`, `order_status`, etc).
      operationId: RetailBrokerageApi_GetHistoricalOrders
      responses:
        '200':
          description: A successful response.
          content:
            application/json:
              schema:
                $ref: >-
                  #/components/schemas/coinbase.public_api.authed.retail_brokerage_api.GetHistoricalOrdersResponse
            text/event-stream:
              schema:
                $ref: >-
                  #/components/schemas/coinbase.public_api.authed.retail_brokerage_api.GetHistoricalOrdersResponse
        default:
          description: An unexpected error response.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/grpc.gateway.runtime.Error'
            text/event-stream:
              schema:
                $ref: '#/components/schemas/grpc.gateway.runtime.Error'
      parameters:
        - name: order_ids
          description: ID(s) of order(s).
          in: query
          required: false
          explode: true
          schema:
            type: array
            items:
              type: string
        - name: product_ids
          description: >-
            Optional string of the product ID(s). Defaults to null, or fetch for
            all products.
          in: query
          required: false
          explode: true
          schema:
            type: array
            items:
              type: string
        - name: product_type
          description: >-
            Returns orders matching this product type. By default, returns all
            product types.
          in: query
          required: false
          schema:
            type: string
            enum:
              - UNKNOWN_PRODUCT_TYPE
              - SPOT
              - FUTURE
            default: UNKNOWN_PRODUCT_TYPE
        - name: order_status
          description: Only returns orders matching the specified order statuses.
          in: query
          required: false
          explode: true
          schema:
            type: array
            items:
              type: string
              enum:
                - PENDING
                - OPEN
                - FILLED
                - CANCELLED
                - EXPIRED
                - FAILED
                - UNKNOWN_ORDER_STATUS
                - QUEUED
                - CANCEL_QUEUED
                - EDIT_QUEUED
        - name: time_in_forces
          description: >-
            Only orders matching this time in force(s) are returned. Default is
            to return all time in forces.
          in: query
          required: false
          explode: true
          schema:
            type: array
            items:
              type: string
              enum:
                - UNKNOWN_TIME_IN_FORCE
                - GOOD_UNTIL_DATE_TIME
                - GOOD_UNTIL_CANCELLED
                - IMMEDIATE_OR_CANCEL
                - FILL_OR_KILL
        - name: order_types
          description: >-
            Only returns orders matching the specified order types (e.g.
            MARKET). By default, returns all order types.
          in: query
          required: false
          explode: true
          schema:
            type: array
            items:
              type: string
              enum:
                - UNKNOWN_ORDER_TYPE
                - MARKET
                - LIMIT
                - STOP
                - STOP_LIMIT
                - BRACKET
                - TWAP
                - ROLL_OPEN
                - ROLL_CLOSE
                - LIQUIDATION
                - SCALED
        - name: order_side
          description: >-
            Only returns the orders matching the specified side (e.g. 'BUY',
            'SELL'). By default, returns all sides.
          in: query
          required: false
          schema:
            type: string
            enum:
              - BUY
              - SELL
            default: ''
        - name: start_date
          description: >-
            The start date to fetch orders from (inclusive). If provided, only
            orders created after this date will be returned.
          in: query
          required: false
          schema:
            type: string
            format: RFC3339 Timestamp
        - name: end_date
          description: >-
            The end date to fetch orders from (exclusive). If provided, only
            orders with creation time before this date will be returned.
          in: query
          required: false
          schema:
            type: string
            format: RFC3339 Timestamp
        - name: order_placement_source
          description: >-
            Only returns the orders matching this placement source. By default,
            returns RETAIL_ADVANCED placement source.
          in: query
          required: false
          schema:
            type: string
            enum:
              - UNKNOWN_PLACEMENT_SOURCE
              - RETAIL_SIMPLE
              - RETAIL_ADVANCED
            default: RETAIL_ADVANCED
        - name: contract_expiry_type
          description: >-
            Only returns the orders matching the contract expiry type. Only
            applicable if product_type is set to FUTURE.
          in: query
          required: false
          schema:
            type: string
            enum:
              - UNKNOWN_CONTRACT_EXPIRY_TYPE
              - EXPIRING
              - PERPETUAL
            default: UNKNOWN_CONTRACT_EXPIRY_TYPE
        - name: asset_filters
          description: >-
            Only returns the orders where the quote, base or underlying asset
            matches the provided asset filter(s) (e.g. 'BTC').
          in: query
          required: false
          explode: true
          schema:
            type: array
            items:
              type: string
        - name: retail_portfolio_id
          description: >-
            **(Deprecated)** Only orders matching this retail portfolio id are
            returned. Only applicable for legacy keys. CDP keys will default to
            the key's permissioned portfolio.
          in: query
          required: false
          schema:
            type: string
        - name: limit
          description: >-
            The number of orders to display per page (no default amount). If
            `has_next` is true, additional pages of orders are available to be
            fetched. Use the `cursor` parameter to start on a specified page.
          in: query
          required: false
          schema:
            type: integer
            format: int32
        - name: cursor
          description: >-
            For paginated responses, returns all responses that come after this
            value.
          in: query
          required: false
          schema:
            type: string
        - name: sort_by
          description: >-
            Sort results by a field, results use unstable pagination. Default is
            to sort by creation time.
          in: query
          required: false
          schema:
            type: string
            enum:
              - UNKNOWN_SORT_BY
              - LIMIT_PRICE
              - LAST_FILL_TIME
              - LAST_UPDATE_TIME
            default: UNKNOWN_SORT_BY
        - name: user_native_currency
          description: >-
            **(Deprecated)**  Native currency to fetch order with. Default is
            `USD`.
          in: query
          required: false
          schema:
            type: string
        - name: use_simplified_total_value_calculation
          description: >-
            Optional boolean to use simplified total value calculation. Default
            is true.
          in: query
          required: false
          schema:
            type: boolean
            default: 'true'
        - name: proof_token
          description: >-
            Optional proof token for 2FA validation when accessing transaction
            history (EU SCA compliance).
          in: query
          required: false
          schema:
            type: string
      tags:
        - Orders
  /api/v3/brokerage/orders/historical/fills:
    get:
      summary: List Fills
      description: >-
        Get a list of fills filtered by optional query parameters (`product_id`,
        `order_id`, etc).
      operationId: RetailBrokerageApi_GetFills
      responses:
        '200':
          description: A successful response.
          content:
            application/json:
              schema:
                $ref: >-
                  #/components/schemas/coinbase.public_api.authed.retail_brokerage_api.GetFillsResponse
            text/event-stream:
              schema:
                $ref: >-
                  #/components/schemas/coinbase.public_api.authed.retail_brokerage_api.GetFillsResponse
        default:
          description: An unexpected error response.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/grpc.gateway.runtime.Error'
            text/event-stream:
              schema:
                $ref: '#/components/schemas/grpc.gateway.runtime.Error'
      parameters:
        - name: order_ids
          description: The ID(s) of order(s).
          in: query
          required: false
          explode: true
          schema:
            type: array
            items:
              type: string
        - name: trade_ids
          description: The ID(s) of the trades of fills.
          in: query
          required: false
          explode: true
          schema:
            type: array
            items:
              type: string
        - name: product_ids
          description: The ID(s) of the product(s) to filter fills by.
          in: query
          required: false
          explode: true
          schema:
            type: array
            items:
              type: string
        - name: start_sequence_timestamp
          description: >-
            Only fills with a trade time after the specified start date are
            returned.
          in: query
          required: false
          schema:
            type: string
            format: RFC3339 Timestamp
        - name: end_sequence_timestamp
          description: >-
            Only fills with a trade time before the specified end date are
            returned.
          in: query
          required: false
          schema:
            type: string
            format: RFC3339 Timestamp
        - name: retail_portfolio_id
          description: >-
            **(Deprecated)** Only fills matching this retail portfolio id are
            returned. Only applicable for legacy keys. CDP keys will default to
            the key's permissioned portfolio.
          in: query
          required: false
          schema:
            type: string
        - name: limit
          description: The number of fills to be returned (default is 100).
          in: query
          required: false
          schema:
            type: integer
            format: int64
        - name: cursor
          description: >-
            For paginated responses, returns all responses that come after this
            value.
          in: query
          required: false
          schema:
            type: string
        - name: sort_by
          description: >-
            Sort results by a field, results use unstable pagination. Default is
            sort by creation time
          in: query
          required: false
          schema:
            type: string
            enum:
              - UNKNOWN_SORT_BY
              - PRICE
              - TRADE_TIME
            default: UNKNOWN_SORT_BY
        - name: asset_filters
          description: >-
            Only returns the fills where the quote, base or underlying asset
            matches the provided asset filter(s) (e.g. 'BTC').
          in: query
          required: false
          explode: true
          schema:
            type: array
            items:
              type: string
        - name: order_types
          description: >-
            Only returns fills for orders matching the specified order types
            (e.g. 'MARKET', 'LIMIT').

             - MARKET: A [market order](https://en.wikipedia.org/wiki/Order_(exchange)#Market_order)
             - LIMIT: A [limit order](https://en.wikipedia.org/wiki/Order_(exchange)#Limit_order)
             - STOP: A stop order is an order that becomes a market order when triggered
             - STOP_LIMIT: A stop order is a limit order that doesn't go on the book until it hits the stop price
             - BRACKET: A bracket order is a way to mitigate potential losses in volatile markets, consisting of a limit price leg and a stop trigger price.
             - TWAP: TWAP order is a way to split large buy/sell orders to smaller chunks to reduce market impact
             - ROLL_OPEN: ROLL_OPEN order is the open step order of a contract roll
             - ROLL_CLOSE: ROLL_CLOSE is the close step order in a contract roll
             - LIQUIDATION: LIQUIDATION is a special order type that is used to liquidate a position
             - SCALED: SCALED order is an order that is split into multiple child orders at incrementally increasing or decreasing prices
          in: query
          required: false
          explode: true
          schema:
            type: array
            items:
              type: string
              enum:
                - UNKNOWN_ORDER_TYPE
                - MARKET
                - LIMIT
                - STOP
                - STOP_LIMIT
                - BRACKET
                - TWAP
                - ROLL_OPEN
                - ROLL_CLOSE
                - LIQUIDATION
                - SCALED
        - name: order_side
          description: >-
            Only returns fills for orders matching the specified side ('BUY' or
            'SELL'). By default, returns all sides.
          in: query
          required: false
          schema:
            type: string
            enum:
              - BUY
              - SELL
            default: ''
        - name: product_types
          description: >-
            Only returns fills for orders matching the specified product types
            (e.g. 'SPOT', 'FUTURE'). By default, returns all product types.
          in: query
          required: false
          explode: true
          schema:
            type: array
            items:
              type: string
              enum:
                - UNKNOWN_PRODUCT_TYPE
                - SPOT
                - FUTURE
        - name: proof_token
          description: >-
            Optional proof token for 2FA validation when accessing transaction
            history (EU SCA compliance).
          in: query
          required: false
          schema:
            type: string
      tags:
        - Orders
  /api/v3/brokerage/orders/historical/{order_id}:
    get:
      summary: Get Order
      description: Get a single order by order ID.
      operationId: RetailBrokerageApi_GetHistoricalOrder
      responses:
        '200':
          description: A successful response.
          content:
            application/json:
              schema:
                $ref: >-
                  #/components/schemas/coinbase.public_api.authed.retail_brokerage_api.GetHistoricalOrderResponse
            text/event-stream:
              schema:
                $ref: >-
                  #/components/schemas/coinbase.public_api.authed.retail_brokerage_api.GetHistoricalOrderResponse
        default:
          description: An unexpected error response.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/grpc.gateway.runtime.Error'
            text/event-stream:
              schema:
                $ref: '#/components/schemas/grpc.gateway.runtime.Error'
      parameters:
        - name: order_id
          description: The ID of the order.
          in: path
          required: true
          schema:
            type: string
        - name: client_order_id
          description: '**(Deprecated)** Client Order ID to fetch the order with.'
          in: query
          required: false
          schema:
            type: string
        - name: user_native_currency
          description: >-
            **(Deprecated)**  Native currency to fetch order with. Default is
            `USD`.
          in: query
          required: false
          schema:
            type: string
      tags:
        - Orders
  /api/v3/brokerage/orders/preview:
    post:
      summary: Preview Order
      description: Preview an order.
      operationId: RetailBrokerageApi_PreviewOrder
      responses:
        '200':
          description: A successful response.
          content:
            application/json:
              schema:
                $ref: >-
                  #/components/schemas/coinbase.public_api.authed.retail_brokerage_api.OrderPreviewResponse
            text/event-stream:
              schema:
                $ref: >-
                  #/components/schemas/coinbase.public_api.authed.retail_brokerage_api.OrderPreviewResponse
        default:
          description: An unexpected error response.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/grpc.gateway.runtime.Error'
            text/event-stream:
              schema:
                $ref: '#/components/schemas/grpc.gateway.runtime.Error'
      requestBody:
        content:
          application/json:
            schema:
              $ref: >-
                #/components/schemas/coinbase.public_api.authed.retail_brokerage_api.OrderPreviewRequest
        required: true
      tags:
        - Orders
  /api/v3/brokerage/orders/close_position:
    post:
      summary: Close Position
      description: >-
        Places an order to close any open positions for a specified
        `product_id`.
      operationId: RetailBrokerageApi_ClosePosition
      responses:
        '200':
          description: A successful response.
          content:
            application/json:
              schema:
                $ref: >-
                  #/components/schemas/coinbase.public_api.authed.retail_brokerage_api.ClosePositionResponse
            text/event-stream:
              schema:
                $ref: >-
                  #/components/schemas/coinbase.public_api.authed.retail_brokerage_api.ClosePositionResponse
        default:
          description: An unexpected error response.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/grpc.gateway.runtime.Error'
            text/event-stream:
              schema:
                $ref: '#/components/schemas/grpc.gateway.runtime.Error'
      requestBody:
        content:
          application/json:
            schema:
              $ref: >-
                #/components/schemas/coinbase.public_api.authed.retail_brokerage_api.ClosePositionRequest
        required: true
      tags:
        - Orders
  /api/v3/brokerage/portfolios:
    get:
      summary: List Portfolios
      description: Get all portfolios of a user.
      operationId: RetailBrokerageApi_GetPortfolios
      responses:
        '200':
          description: A successful response.
          content:
            application/json:
              schema:
                $ref: >-
                  #/components/schemas/coinbase.public_api.authed.retail_brokerage_api.GetPortfoliosResponse
            text/event-stream:
              schema:
                $ref: >-
                  #/components/schemas/coinbase.public_api.authed.retail_brokerage_api.GetPortfoliosResponse
        default:
          description: An unexpected error response.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/grpc.gateway.runtime.Error'
            text/event-stream:
              schema:
                $ref: '#/components/schemas/grpc.gateway.runtime.Error'
      parameters:
        - name: portfolio_type
          description: Only returns portfolios matching this portfolio type.
          in: query
          required: false
          schema:
            type: string
            enum:
              - UNDEFINED
              - DEFAULT
              - CONSUMER
              - INTX
            default: UNDEFINED
      tags:
        - Portfolios
    post:
      summary: Create Portfolio
      description: Create a portfolio.
      operationId: RetailBrokerageApi_CreatePortfolio
      responses:
        '200':
          description: A successful response.
          content:
            application/json:
              schema:
                $ref: >-
                  #/components/schemas/coinbase.public_api.authed.retail_brokerage_api.CreatePortfolioResponse
            text/event-stream:
              schema:
                $ref: >-
                  #/components/schemas/coinbase.public_api.authed.retail_brokerage_api.CreatePortfolioResponse
        default:
          description: An unexpected error response.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/grpc.gateway.runtime.Error'
            text/event-stream:
              schema:
                $ref: '#/components/schemas/grpc.gateway.runtime.Error'
      requestBody:
        content:
          application/json:
            schema:
              $ref: >-
                #/components/schemas/coinbase.public_api.authed.retail_brokerage_api.CreatePortfolioRequest
        required: true
      tags:
        - Portfolios
  /api/v3/brokerage/portfolios/move_funds:
    post:
      summary: Move Portfolio Funds
      description: Move funds between portfolios.
      operationId: RetailBrokerageApi_MovePortfolioFunds
      responses:
        '200':
          description: A successful response.
          content:
            application/json:
              schema:
                $ref: >-
                  #/components/schemas/coinbase.public_api.authed.retail_brokerage_api.MovePortfolioFundsResponse
            text/event-stream:
              schema:
                $ref: >-
                  #/components/schemas/coinbase.public_api.authed.retail_brokerage_api.MovePortfolioFundsResponse
        default:
          description: An unexpected error response.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/grpc.gateway.runtime.Error'
            text/event-stream:
              schema:
                $ref: '#/components/schemas/grpc.gateway.runtime.Error'
      requestBody:
        content:
          application/json:
            schema:
              $ref: >-
                #/components/schemas/coinbase.public_api.authed.retail_brokerage_api.MovePortfolioFundsRequest
        required: true
      tags:
        - Portfolios
  /api/v3/brokerage/portfolios/{portfolio_uuid}:
    get:
      summary: Get Portfolio Breakdown
      description: Get the breakdown of a portfolio.
      operationId: RetailBrokerageApi_GetPortfolioBreakdown
      responses:
        '200':
          description: A successful response.
          content:
            application/json:
              schema:
                $ref: >-
                  #/components/schemas/coinbase.public_api.authed.retail_brokerage_api.GetPortfolioBreakdownResponse
            text/event-stream:
              schema:
                $ref: >-
                  #/components/schemas/coinbase.public_api.authed.retail_brokerage_api.GetPortfolioBreakdownResponse
        default:
          description: An unexpected error response.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/grpc.gateway.runtime.Error'
            text/event-stream:
              schema:
                $ref: '#/components/schemas/grpc.gateway.runtime.Error'
      parameters:
        - name: portfolio_uuid
          description: The portfolio UUID.
          in: path
          required: true
          schema:
            type: string
        - name: currency
          description: The currency symbol (e.g. USD).
          in: query
          required: false
          schema:
            type: string
      tags:
        - Portfolios
    delete:
      summary: Delete Portfolio
      description: Delete portfolio.
      operationId: RetailBrokerageApi_DeletePortfolio
      responses:
        '200':
          description: A successful response.
          content:
            application/json:
              schema:
                $ref: >-
                  #/components/schemas/coinbase.public_api.authed.retail_brokerage_api.DeletePortfolioResponse
            text/event-stream:
              schema:
                $ref: >-
                  #/components/schemas/coinbase.public_api.authed.retail_brokerage_api.DeletePortfolioResponse
        default:
          description: An unexpected error response.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/grpc.gateway.runtime.Error'
            text/event-stream:
              schema:
                $ref: '#/components/schemas/grpc.gateway.runtime.Error'
      parameters:
        - name: portfolio_uuid
          description: The portfolio UUID.
          in: path
          required: true
          schema:
            type: string
      tags:
        - Portfolios
    put:
      summary: Edit Portfolio
      description: Edit a portfolio.
      operationId: RetailBrokerageApi_EditPortfolio
      responses:
        '200':
          description: A successful response.
          content:
            application/json:
              schema:
                $ref: >-
                  #/components/schemas/coinbase.public_api.authed.retail_brokerage_api.EditPortfolioResponse
            text/event-stream:
              schema:
                $ref: >-
                  #/components/schemas/coinbase.public_api.authed.retail_brokerage_api.EditPortfolioResponse
        default:
          description: An unexpected error response.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/grpc.gateway.runtime.Error'
            text/event-stream:
              schema:
                $ref: '#/components/schemas/grpc.gateway.runtime.Error'
      parameters:
        - name: portfolio_uuid
          description: The portfolio UUID.
          in: path
          required: true
          schema:
            type: string
      requestBody:
        content:
          application/json:
            schema:
              $ref: >-
                #/components/schemas/coinbase.public_api.authed.retail_brokerage_api.EditPortfolioRequest
        required: true
      tags:
        - Portfolios
  /api/v3/brokerage/cfm/balance_summary:
    get:
      summary: Get Futures Balance Summary
      description: Get a summary of balances for CFM trading
      operationId: RetailBrokerageApi_GetFCMBalanceSummary
      responses:
        '200':
          description: A successful response.
          content:
            application/json:
              schema:
                $ref: >-
                  #/components/schemas/coinbase.retail.rest.proxy.fcm.GetFCMBalanceSummaryResponse
            text/event-stream:
              schema:
                $ref: >-
                  #/components/schemas/coinbase.retail.rest.proxy.fcm.GetFCMBalanceSummaryResponse
        default:
          description: An unexpected error response.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/grpc.gateway.runtime.Error'
            text/event-stream:
              schema:
                $ref: '#/components/schemas/grpc.gateway.runtime.Error'
      tags:
        - Futures
  /api/v3/brokerage/cfm/intraday/margin_setting:
    get:
      summary: Get Intraday Margin Setting
      description: Get the futures intraday margin setting
      operationId: RetailBrokerageApi_GetIntradayMarginSetting
      responses:
        '200':
          description: A successful response.
          content:
            application/json:
              schema:
                $ref: >-
                  #/components/schemas/coinbase.retail.rest.proxy.fcm.GetIntradayMarginSettingResponse
            text/event-stream:
              schema:
                $ref: >-
                  #/components/schemas/coinbase.retail.rest.proxy.fcm.GetIntradayMarginSettingResponse
        default:
          description: An unexpected error response.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/grpc.gateway.runtime.Error'
            text/event-stream:
              schema:
                $ref: '#/components/schemas/grpc.gateway.runtime.Error'
      tags:
        - Futures
    post:
      summary: Set Intraday Margin Setting
      description: Set the futures intraday margin setting
      operationId: RetailBrokerageApi_SetIntradayMarginSetting
      responses:
        '200':
          description: A successful response.
          content:
            application/json:
              schema:
                $ref: >-
                  #/components/schemas/coinbase.retail.rest.proxy.fcm.SetIntradayMarginSettingResponse
            text/event-stream:
              schema:
                $ref: >-
                  #/components/schemas/coinbase.retail.rest.proxy.fcm.SetIntradayMarginSettingResponse
        default:
          description: An unexpected error response.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/grpc.gateway.runtime.Error'
            text/event-stream:
              schema:
                $ref: '#/components/schemas/grpc.gateway.runtime.Error'
      requestBody:
        content:
          application/json:
            schema:
              $ref: >-
                #/components/schemas/coinbase.retail.rest.proxy.fcm.SetIntradayMarginSettingRequest
        required: true
      tags:
        - Futures
  /api/v3/brokerage/cfm/intraday/current_margin_window:
    get:
      summary: Get Current Margin Window
      description: Get the futures current margin window
      operationId: RetailBrokerageApi_GetCurrentMarginWindow
      responses:
        '200':
          description: A successful response.
          content:
            application/json:
              schema:
                $ref: >-
                  #/components/schemas/coinbase.retail.rest.proxy.fcm.GetCurrentMarginWindowResponse
            text/event-stream:
              schema:
                $ref: >-
                  #/components/schemas/coinbase.retail.rest.proxy.fcm.GetCurrentMarginWindowResponse
        default:
          description: An unexpected error response.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/grpc.gateway.runtime.Error'
            text/event-stream:
              schema:
                $ref: '#/components/schemas/grpc.gateway.runtime.Error'
      parameters:
        - name: margin_profile_type
          description: The margin profile type for your account.
          in: query
          required: false
          schema:
            type: string
            enum:
              - MARGIN_PROFILE_TYPE_UNSPECIFIED
              - MARGIN_PROFILE_TYPE_RETAIL_REGULAR
              - MARGIN_PROFILE_TYPE_RETAIL_INTRADAY_MARGIN_1
            default: MARGIN_PROFILE_TYPE_UNSPECIFIED
      tags:
        - Futures
  /api/v3/brokerage/cfm/positions:
    get:
      summary: List Futures Positions
      description: Get a list of positions in CFM products
      operationId: RetailBrokerageApi_GetFCMPositions
      responses:
        '200':
          description: A successful response.
          content:
            application/json:
              schema:
                $ref: >-
                  #/components/schemas/coinbase.retail.rest.proxy.fcm.GetFCMPositionsResponse
            text/event-stream:
              schema:
                $ref: >-
                  #/components/schemas/coinbase.retail.rest.proxy.fcm.GetFCMPositionsResponse
        default:
          description: An unexpected error response.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/grpc.gateway.runtime.Error'
            text/event-stream:
              schema:
                $ref: '#/components/schemas/grpc.gateway.runtime.Error'
      tags:
        - Futures
  /api/v3/brokerage/cfm/positions/{product_id}:
    get:
      summary: Get Futures Position
      description: Get positions for a specific CFM product
      operationId: RetailBrokerageApi_GetFCMPosition
      responses:
        '200':
          description: A successful response.
          content:
            application/json:
              schema:
                $ref: >-
                  #/components/schemas/coinbase.retail.rest.proxy.fcm.GetFCMPositionResponse
            text/event-stream:
              schema:
                $ref: >-
                  #/components/schemas/coinbase.retail.rest.proxy.fcm.GetFCMPositionResponse
        default:
          description: An unexpected error response.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/grpc.gateway.runtime.Error'
            text/event-stream:
              schema:
                $ref: '#/components/schemas/grpc.gateway.runtime.Error'
      parameters:
        - name: product_id
          description: The ticker symbol (e.g. 'BIT-28JUL23-CDE').
          in: path
          required: true
          schema:
            type: string
      tags:
        - Futures
  /api/v3/brokerage/cfm/sweeps/schedule:
    post:
      summary: Schedule Futures Sweep
      description: Schedules a sweep of funds from FCM wallet to USD Spot wallet
      operationId: RetailBrokerageApi_ScheduleFCMSweep
      responses:
        '200':
          description: A successful response.
          content:
            application/json:
              schema:
                $ref: >-
                  #/components/schemas/coinbase.retail.rest.proxy.fcm.ScheduleFCMSweepResponse
            text/event-stream:
              schema:
                $ref: >-
                  #/components/schemas/coinbase.retail.rest.proxy.fcm.ScheduleFCMSweepResponse
        default:
          description: An unexpected error response.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/grpc.gateway.runtime.Error'
            text/event-stream:
              schema:
                $ref: '#/components/schemas/grpc.gateway.runtime.Error'
      requestBody:
        content:
          application/json:
            schema:
              $ref: >-
                #/components/schemas/coinbase.retail.rest.proxy.fcm.ScheduleFCMSweepRequest
        required: true
      tags:
        - Futures
  /api/v3/brokerage/cfm/sweeps:
    get:
      summary: List Futures Sweeps
      description: >-
        Get pending and processing sweeps of funds from FCM wallet to USD Spot
        wallet
      operationId: RetailBrokerageApi_GetFCMSweeps
      responses:
        '200':
          description: A successful response.
          content:
            application/json:
              schema:
                $ref: >-
                  #/components/schemas/coinbase.retail.rest.proxy.fcm.GetFCMSweepsResponse
            text/event-stream:
              schema:
                $ref: >-
                  #/components/schemas/coinbase.retail.rest.proxy.fcm.GetFCMSweepsResponse
        default:
          description: An unexpected error response.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/grpc.gateway.runtime.Error'
            text/event-stream:
              schema:
                $ref: '#/components/schemas/grpc.gateway.runtime.Error'
      tags:
        - Futures
    delete:
      summary: Cancel Pending Futures Sweep
      description: Cancel the pending sweep of funds from FCM wallet to USD Spot wallet
      operationId: RetailBrokerageApi_CancelFCMSweep
      responses:
        '200':
          description: A successful response.
          content:
            application/json:
              schema:
                $ref: >-
                  #/components/schemas/coinbase.retail.rest.proxy.fcm.CancelFCMSweepResponse
            text/event-stream:
              schema:
                $ref: >-
                  #/components/schemas/coinbase.retail.rest.proxy.fcm.CancelFCMSweepResponse
        default:
          description: An unexpected error response.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/grpc.gateway.runtime.Error'
            text/event-stream:
              schema:
                $ref: '#/components/schemas/grpc.gateway.runtime.Error'
      tags:
        - Futures
  /api/v3/brokerage/intx/allocate:
    post:
      summary: Allocate Portfolio
      description: Allocate portfolio funds to a sub-portfolio on Intx Portfolio
      operationId: RetailBrokerageApi_AllocatePortfolio
      responses:
        '200':
          description: A successful response.
          content:
            application/json:
              schema:
                $ref: >-
                  #/components/schemas/coinbase.retail.rest.proxy.intx.AllocatePortfolioResponse
            text/event-stream:
              schema:
                $ref: >-
                  #/components/schemas/coinbase.retail.rest.proxy.intx.AllocatePortfolioResponse
        default:
          description: An unexpected error response.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/grpc.gateway.runtime.Error'
            text/event-stream:
              schema:
                $ref: '#/components/schemas/grpc.gateway.runtime.Error'
      requestBody:
        content:
          application/json:
            schema:
              $ref: >-
                #/components/schemas/coinbase.retail.rest.proxy.intx.AllocatePortfolioRequest
        required: true
      tags:
        - Perpetuals
  /api/v3/brokerage/intx/portfolio/{portfolio_uuid}:
    get:
      summary: Get Perpetuals Portfolio Summary
      description: Get a summary of your Perpetuals portfolio
      operationId: RetailBrokerageApi_GetIntxPortfolioSummary
      responses:
        '200':
          description: A successful response.
          content:
            application/json:
              schema:
                $ref: >-
                  #/components/schemas/coinbase.retail.rest.proxy.intx.GetPortfoliosResponse
            text/event-stream:
              schema:
                $ref: >-
                  #/components/schemas/coinbase.retail.rest.proxy.intx.GetPortfoliosResponse
        default:
          description: An unexpected error response.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/grpc.gateway.runtime.Error'
            text/event-stream:
              schema:
                $ref: '#/components/schemas/grpc.gateway.runtime.Error'
      parameters:
        - name: portfolio_uuid
          description: The portfolio UUID.
          in: path
          required: true
          schema:
            type: string
      tags:
        - Perpetuals
  /api/v3/brokerage/intx/positions/{portfolio_uuid}:
    get:
      summary: List Perpetuals Positions
      description: Get a list of open positions in your Perpetuals portfolio
      operationId: RetailBrokerageApi_GetIntxPositions
      responses:
        '200':
          description: A successful response.
          content:
            application/json:
              schema:
                $ref: >-
                  #/components/schemas/coinbase.retail.rest.proxy.intx.GetPositionsResponse
            text/event-stream:
              schema:
                $ref: >-
                  #/components/schemas/coinbase.retail.rest.proxy.intx.GetPositionsResponse
        default:
          description: An unexpected error response.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/grpc.gateway.runtime.Error'
            text/event-stream:
              schema:
                $ref: '#/components/schemas/grpc.gateway.runtime.Error'
      parameters:
        - name: portfolio_uuid
          description: The portfolio UUID.
          in: path
          required: true
          schema:
            type: string
      tags:
        - Perpetuals
  /api/v3/brokerage/intx/positions/{portfolio_uuid}/{symbol}:
    get:
      summary: Get Perpetuals Position
      description: Get a specific open position on Intx
      operationId: RetailBrokerageApi_GetIntxPosition
      responses:
        '200':
          description: A successful response.
          content:
            application/json:
              schema:
                $ref: >-
                  #/components/schemas/coinbase.retail.rest.proxy.intx.GetPositionResponse
            text/event-stream:
              schema:
                $ref: >-
                  #/components/schemas/coinbase.retail.rest.proxy.intx.GetPositionResponse
        default:
          description: An unexpected error response.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/grpc.gateway.runtime.Error'
            text/event-stream:
              schema:
                $ref: '#/components/schemas/grpc.gateway.runtime.Error'
      parameters:
        - name: portfolio_uuid
          description: The portfolio UUID.
          in: path
          required: true
          schema:
            type: string
        - name: symbol
          description: The trading pair (e.g. 'BTC-PERP-INTX').
          in: path
          required: true
          schema:
            type: string
      tags:
        - Perpetuals
  /api/v3/brokerage/intx/balances/{portfolio_uuid}:
    get:
      summary: Get Portfolios Balances
      description: Get a list of asset balances on Intx for a given Portfolio
      operationId: RetailBrokerageApi_GetIntxBalances
      responses:
        '200':
          description: A successful response.
          content:
            application/json:
              schema:
                $ref: >-
                  #/components/schemas/coinbase.intx_common.GetBalanceSummaryResponse
            text/event-stream:
              schema:
                $ref: >-
                  #/components/schemas/coinbase.intx_common.GetBalanceSummaryResponse
        default:
          description: An unexpected error response.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/grpc.gateway.runtime.Error'
            text/event-stream:
              schema:
                $ref: '#/components/schemas/grpc.gateway.runtime.Error'
      parameters:
        - name: portfolio_uuid
          in: path
          required: true
          schema:
            type: string
      tags:
        - Perpetuals
  /api/v3/brokerage/intx/multi_asset_collateral:
    post:
      summary: Opt In or Out of Multi Asset Collateral
      description: Enable or Disable Multi Asset Collateral for a given Portfolio
      operationId: RetailBrokerageApi_IntxMultiAssetCollateral
      responses:
        '200':
          description: A successful response.
          content:
            application/json:
              schema:
                $ref: >-
                  #/components/schemas/coinbase.retail.rest.proxy.intx.MultiAssetCollateralResponse
            text/event-stream:
              schema:
                $ref: >-
                  #/components/schemas/coinbase.retail.rest.proxy.intx.MultiAssetCollateralResponse
        default:
          description: An unexpected error response.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/grpc.gateway.runtime.Error'
            text/event-stream:
              schema:
                $ref: '#/components/schemas/grpc.gateway.runtime.Error'
      requestBody:
        content:
          application/json:
            schema:
              $ref: >-
                #/components/schemas/coinbase.retail.rest.proxy.intx.MultiAssetCollateralRequest
        required: true
      tags:
        - Perpetuals
  /api/v3/brokerage/transaction_summary:
    get:
      summary: Get Transaction Summary
      description: Get a summary of transactions with fee tiers, total volume, and fees.
      operationId: RetailBrokerageApi_GetTransactionSummary
      responses:
        '200':
          description: A successful response.
          content:
            application/json:
              schema:
                $ref: >-
                  #/components/schemas/coinbase.public_api.authed.retail_brokerage_api.GetTransactionSummaryResponse
            text/event-stream:
              schema:
                $ref: >-
                  #/components/schemas/coinbase.public_api.authed.retail_brokerage_api.GetTransactionSummaryResponse
        default:
          description: An unexpected error response.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/grpc.gateway.runtime.Error'
            text/event-stream:
              schema:
                $ref: '#/components/schemas/grpc.gateway.runtime.Error'
      parameters:
        - name: product_type
          description: >-
            Only returns the orders matching this product type. By default,
            returns all product types.
          in: query
          required: false
          schema:
            type: string
            enum:
              - UNKNOWN_PRODUCT_TYPE
              - SPOT
              - FUTURE
            default: UNKNOWN_PRODUCT_TYPE
        - name: contract_expiry_type
          description: >-
            Only returns the orders matching this contract expiry type. Only
            applicable if product_type is set to FUTURE.
          in: query
          required: false
          schema:
            type: string
            enum:
              - UNKNOWN_CONTRACT_EXPIRY_TYPE
              - EXPIRING
              - PERPETUAL
            default: UNKNOWN_CONTRACT_EXPIRY_TYPE
        - name: product_venue
          description: Venue for product
          in: query
          required: false
          schema:
            type: string
            enum:
              - UNKNOWN_VENUE_TYPE
              - CBE
              - FCM
              - INTX
            default: UNKNOWN_VENUE_TYPE
      tags:
        - Fees
  /api/v3/brokerage/convert/quote:
    post:
      summary: Create Convert Quote
      description: >-
        Create a convert quote with a specified source account, target account,
        and amount. Convert is applicable for USDC-USD, PYUSD-USD, EURC-EUR
        conversion, and PYUSD-USDC conversion
      operationId: RetailBrokerageApi_CreateConvertQuote
      responses:
        '200':
          description: A successful response.
          content:
            application/json:
              schema:
                $ref: >-
                  #/components/schemas/coinbase.retail.rest.proxy.convert.CreateConvertQuoteResponse
            text/event-stream:
              schema:
                $ref: >-
                  #/components/schemas/coinbase.retail.rest.proxy.convert.CreateConvertQuoteResponse
        default:
          description: An unexpected error response.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/grpc.gateway.runtime.Error'
            text/event-stream:
              schema:
                $ref: '#/components/schemas/grpc.gateway.runtime.Error'
      requestBody:
        content:
          application/json:
            schema:
              $ref: >-
                #/components/schemas/coinbase.retail.rest.proxy.convert.CreateConvertQuoteRequest
        required: true
      tags:
        - Converts
  /api/v3/brokerage/convert/trade/{trade_id}:
    get:
      summary: Get Convert Trade
      description: >-
        Gets a list of information about a convert trade with a specified trade
        id, source account, and target account
      operationId: RetailBrokerageApi_GetConvertTrade
      responses:
        '200':
          description: A successful response.
          content:
            application/json:
              schema:
                $ref: >-
                  #/components/schemas/coinbase.retail.rest.proxy.convert.GetConvertTradeResponse
            text/event-stream:
              schema:
                $ref: >-
                  #/components/schemas/coinbase.retail.rest.proxy.convert.GetConvertTradeResponse
        default:
          description: An unexpected error response.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/grpc.gateway.runtime.Error'
            text/event-stream:
              schema:
                $ref: '#/components/schemas/grpc.gateway.runtime.Error'
      parameters:
        - name: trade_id
          description: The ID of the trade to commit.
          in: path
          required: true
          schema:
            type: string
        - name: from_account
          description: The currency of the account to convert from (e.g. USD).
          in: query
          required: true
          schema:
            type: string
        - name: to_account
          description: The currency of the account to convert to (e.g. USDC).
          in: query
          required: true
          schema:
            type: string
      tags:
        - Converts
    post:
      summary: Commit Convert Trade
      description: >-
        Commits a convert trade with a specified trade id, source account, and
        target account
      operationId: RetailBrokerageApi_CommitConvertTrade
      responses:
        '200':
          description: A successful response.
          content:
            application/json:
              schema:
                $ref: >-
                  #/components/schemas/coinbase.retail.rest.proxy.convert.CommitConvertTradeResponse
            text/event-stream:
              schema:
                $ref: >-
                  #/components/schemas/coinbase.retail.rest.proxy.convert.CommitConvertTradeResponse
        default:
          description: An unexpected error response.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/grpc.gateway.runtime.Error'
            text/event-stream:
              schema:
                $ref: '#/components/schemas/grpc.gateway.runtime.Error'
      parameters:
        - name: trade_id
          description: The ID of the trade to commit.
          in: path
          required: true
          schema:
            type: string
      requestBody:
        content:
          application/json:
            schema:
              $ref: >-
                #/components/schemas/coinbase.retail.rest.proxy.convert.CommitConvertTradeRequest
        required: true
      tags:
        - Converts
  /api/v3/brokerage/time:
    get:
      summary: Get Server Time
      description: Get the current time from the Coinbase Advanced API.
      operationId: RetailBrokerageApi_GetServerTime
      responses:
        '200':
          description: A successful response.
          content:
            application/json:
              schema:
                $ref: >-
                  #/components/schemas/coinbase.retail.rest.proxy.common.ExtendedTimestamp
            text/event-stream:
              schema:
                $ref: >-
                  #/components/schemas/coinbase.retail.rest.proxy.common.ExtendedTimestamp
        default:
          description: An unexpected error response.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/grpc.gateway.runtime.Error'
            text/event-stream:
              schema:
                $ref: '#/components/schemas/grpc.gateway.runtime.Error'
      tags:
        - Public
  /api/v3/brokerage/market/product_book:
    get:
      summary: Get Public Product Book
      description: >-
        Get a list of bids/asks for a single product. The amount of detail shown
        can be customized with the limit parameter.
      operationId: RetailBrokerageApi_GetPublicProductBook
      responses:
        '200':
          description: A successful response.
          content:
            application/json:
              schema:
                $ref: >-
                  #/components/schemas/coinbase.public_api.authed.retail_brokerage_api.GetProductBookResponse
            text/event-stream:
              schema:
                $ref: >-
                  #/components/schemas/coinbase.public_api.authed.retail_brokerage_api.GetProductBookResponse
        default:
          description: An unexpected error response.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/grpc.gateway.runtime.Error'
            text/event-stream:
              schema:
                $ref: '#/components/schemas/grpc.gateway.runtime.Error'
      parameters:
        - name: product_id
          description: The trading pair (e.g. 'BTC-USD').
          in: query
          required: true
          schema:
            type: string
        - name: limit
          description: 'The number of bid/asks to be returned. '
          in: query
          required: false
          schema:
            type: integer
            format: int32
        - name: aggregation_price_increment
          description: >-
            The minimum price intervals at which buy and sell orders are grouped
            or combined in the order book.
          in: query
          required: false
          schema:
            type: string
      tags:
        - Public
  /api/v3/brokerage/market/products:
    get:
      summary: List Public Products
      description: Get a list of the available currency pairs for trading.
      operationId: RetailBrokerageApi_GetPublicProducts
      responses:
        '200':
          description: A successful response.
          content:
            application/json:
              schema:
                $ref: >-
                  #/components/schemas/coinbase.public_api.authed.retail_brokerage_api.Products
            text/event-stream:
              schema:
                $ref: >-
                  #/components/schemas/coinbase.public_api.authed.retail_brokerage_api.Products
        default:
          description: An unexpected error response.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/grpc.gateway.runtime.Error'
            text/event-stream:
              schema:
                $ref: '#/components/schemas/grpc.gateway.runtime.Error'
      parameters:
        - name: limit
          description: The number of products to be returned.
          in: query
          required: false
          schema:
            type: integer
            format: int32
        - name: offset
          description: The number of products to skip before returning.
          in: query
          required: false
          schema:
            type: integer
            format: int32
        - name: product_type
          description: >-
            Only returns the orders matching this product type. By default,
            returns all product types.
          in: query
          required: false
          schema:
            type: string
            enum:
              - UNKNOWN_PRODUCT_TYPE
              - SPOT
              - FUTURE
            default: UNKNOWN_PRODUCT_TYPE
        - name: product_ids
          description: The list of trading pairs (e.g. 'BTC-USD').
          in: query
          required: false
          explode: true
          schema:
            type: array
            items:
              type: string
        - name: contract_expiry_type
          description: >-
            Only returns the orders matching the contract expiry type. Only
            applicable if product_type is set to FUTURE.
          in: query
          required: false
          schema:
            type: string
            enum:
              - UNKNOWN_CONTRACT_EXPIRY_TYPE
              - EXPIRING
              - PERPETUAL
            default: UNKNOWN_CONTRACT_EXPIRY_TYPE
        - name: expiring_contract_status
          description: Only returns contracts with this status (default is UNEXPIRED).
          in: query
          required: false
          schema:
            type: string
            enum:
              - UNKNOWN_EXPIRING_CONTRACT_STATUS
              - STATUS_UNEXPIRED
              - STATUS_EXPIRED
              - STATUS_ALL
            default: UNKNOWN_EXPIRING_CONTRACT_STATUS
        - name: get_all_products
          description: >-
            If true, return all products of all product types (including expired
            futures contracts).
          in: query
          required: false
          schema:
            type: boolean
        - name: products_sort_order
          description: >-
            The order in which products are returned. By default, products are
            returned in 24 hour volume descending (in quote).
          in: query
          required: false
          schema:
            type: string
            enum:
              - PRODUCTS_SORT_ORDER_UNDEFINED
              - PRODUCTS_SORT_ORDER_VOLUME_24H_DESCENDING
              - PRODUCTS_SORT_ORDER_LIST_TIME_DESCENDING
            default: PRODUCTS_SORT_ORDER_UNDEFINED
        - name: cursor
          description: >-
            The cursor to use for pagination. This will be a base64 encoded
            string that decodes into the last productId of the previously
            returned page
          in: query
          required: false
          schema:
            type: string
        - name: futures_underlying_type
          description: >-
            Only returns the products matching the underlying type. Only
            applicable if product_type is set to FUTURE.
          in: query
          required: false
          schema:
            type: string
            enum:
              - UNKNOWN_FUTURES_UNDERLYING_TYPE
              - FUTURES_UNDERLYING_TYPE_SPOT
              - FUTURES_UNDERLYING_TYPE_INDEX
              - FUTURES_UNDERLYING_TYPE_EQUITY
              - FUTURES_UNDERLYING_TYPE_EQUITY_INDEX
              - FUTURES_UNDERLYING_TYPE_EQUITY_ETF
              - FUTURES_UNDERLYING_TYPE_PREIPO
              - FUTURES_UNDERLYING_TYPE_COMMOD
              - FUTURES_UNDERLYING_TYPE_COMMOD_ETF
              - FUTURES_UNDERLYING_TYPE_COMMOD_INDEX
              - FUTURES_UNDERLYING_TYPE_ADR
              - FUTURES_UNDERLYING_TYPE_FOREIGN_EQUITY
              - FUTURES_UNDERLYING_TYPE_OTC
            default: UNKNOWN_FUTURES_UNDERLYING_TYPE
        - name: user_country_code
          description: >-
            The country code of the user. This is used to provide differentiated
            product display names.
          in: query
          required: false
          schema:
            type: string
      tags:
        - Public
  /api/v3/brokerage/market/products/{product_id}:
    get:
      summary: Get Public Product
      description: Get information on a single product by product ID.
      operationId: RetailBrokerageApi_GetPublicProduct
      responses:
        '200':
          description: A successful response.
          content:
            application/json:
              schema:
                $ref: >-
                  #/components/schemas/coinbase.public_api.authed.retail_brokerage_api.Product
            text/event-stream:
              schema:
                $ref: >-
                  #/components/schemas/coinbase.public_api.authed.retail_brokerage_api.Product
        default:
          description: An unexpected error response.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/grpc.gateway.runtime.Error'
            text/event-stream:
              schema:
                $ref: '#/components/schemas/grpc.gateway.runtime.Error'
      parameters:
        - name: product_id
          description: The trading pair (e.g. 'BTC-USD').
          in: path
          required: true
          schema:
            type: string
      tags:
        - Public
  /api/v3/brokerage/market/products/{product_id}/candles:
    get:
      summary: Get Public Product Candles
      description: Get rates for a single product by product ID, grouped in buckets.
      operationId: RetailBrokerageApi_GetPublicCandles
      responses:
        '200':
          description: A successful response.
          content:
            application/json:
              schema:
                $ref: >-
                  #/components/schemas/coinbase.public_api.authed.retail_brokerage_api.Candles
            text/event-stream:
              schema:
                $ref: >-
                  #/components/schemas/coinbase.public_api.authed.retail_brokerage_api.Candles
        default:
          description: An unexpected error response.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/grpc.gateway.runtime.Error'
            text/event-stream:
              schema:
                $ref: '#/components/schemas/grpc.gateway.runtime.Error'
      parameters:
        - name: product_id
          description: The trading pair (e.g. 'BTC-USD').
          in: path
          required: true
          schema:
            type: string
        - name: start
          description: The UNIX timestamp indicating the start of the time interval.
          in: query
          required: true
          schema:
            type: string
        - name: end
          description: The UNIX timestamp indicating the end of the time interval.
          in: query
          required: true
          schema:
            type: string
        - name: granularity
          description: The timeframe each candle represents.
          in: query
          required: true
          schema:
            type: string
            enum:
              - UNKNOWN_GRANULARITY
              - ONE_MINUTE
              - FIVE_MINUTE
              - FIFTEEN_MINUTE
              - THIRTY_MINUTE
              - ONE_HOUR
              - TWO_HOUR
              - FOUR_HOUR
              - SIX_HOUR
              - ONE_DAY
            default: UNKNOWN_GRANULARITY
        - name: limit
          description: >-
            The number of candle buckets to be returned. By default, returns 350
            (max 350).
          in: query
          required: false
          schema:
            type: integer
            format: int32
      tags:
        - Public
  /api/v3/brokerage/market/products/{product_id}/ticker:
    get:
      summary: Get Public Market Trades
      description: >-
        Get snapshot information by product ID about the last trades (ticks) and
        best bid/ask.
      operationId: RetailBrokerageApi_GetPublicMarketTrades
      responses:
        '200':
          description: A successful response.
          content:
            application/json:
              schema:
                $ref: >-
                  #/components/schemas/coinbase.public_api.authed.retail_brokerage_api.GetMarketTradesResponse
            text/event-stream:
              schema:
                $ref: >-
                  #/components/schemas/coinbase.public_api.authed.retail_brokerage_api.GetMarketTradesResponse
        default:
          description: An unexpected error response.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/grpc.gateway.runtime.Error'
            text/event-stream:
              schema:
                $ref: '#/components/schemas/grpc.gateway.runtime.Error'
      parameters:
        - name: product_id
          description: The trading pair (e.g. 'BTC-USD').
          in: path
          required: true
          schema:
            type: string
        - name: limit
          description: 'The number of trades to be returned. '
          in: query
          required: true
          schema:
            type: integer
            format: int32
        - name: start
          description: The UNIX timestamp indicating the start of the time interval.
          in: query
          required: false
          schema:
            type: string
        - name: end
          description: The UNIX timestamp indicating the end of the time interval.
          in: query
          required: false
          schema:
            type: string
      tags:
        - Public
  /api/v3/brokerage/payment_methods:
    get:
      summary: List Payment Methods
      description: Get a list of payment methods for the current user.
      operationId: RetailBrokerageApi_GetPaymentMethods
      responses:
        '200':
          description: A successful response.
          content:
            application/json:
              schema:
                $ref: >-
                  #/components/schemas/coinbase.retail.rest.proxy.payment_method.GetPaymentMethodsResponse
            text/event-stream:
              schema:
                $ref: >-
                  #/components/schemas/coinbase.retail.rest.proxy.payment_method.GetPaymentMethodsResponse
        default:
          description: An unexpected error response.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/grpc.gateway.runtime.Error'
            text/event-stream:
              schema:
                $ref: '#/components/schemas/grpc.gateway.runtime.Error'
      tags:
        - Payment Methods
  /api/v3/brokerage/payment_methods/{payment_method_id}:
    get:
      summary: Get Payment Method
      description: Get information about a payment method for the current user.
      operationId: RetailBrokerageApi_GetPaymentMethod
      responses:
        '200':
          description: A successful response.
          content:
            application/json:
              schema:
                $ref: >-
                  #/components/schemas/coinbase.retail.rest.proxy.payment_method.GetPaymentMethodResponse
            text/event-stream:
              schema:
                $ref: >-
                  #/components/schemas/coinbase.retail.rest.proxy.payment_method.GetPaymentMethodResponse
        default:
          description: An unexpected error response.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/grpc.gateway.runtime.Error'
            text/event-stream:
              schema:
                $ref: '#/components/schemas/grpc.gateway.runtime.Error'
      parameters:
        - name: payment_method_id
          description: >-
            The ID of the payment method. Refer to [List Payment
            Methods](https://docs.cdp.coinbase.com/advanced-trade/reference/retailbrokerageapi_getpaymentmethods/)
            for the list of all available payment methods and their
            corresponding IDs.
          in: path
          required: true
          schema:
            type: string
      tags:
        - Payment Methods
  /api/v3/brokerage/key_permissions:
    get:
      summary: Get API Key Permissions
      description: Get information about your CDP API key permissions
      operationId: RetailBrokerageApi_GetApiKeyPermissions
      responses:
        '200':
          description: A successful response.
          content:
            application/json:
              schema:
                $ref: >-
                  #/components/schemas/coinbase.retail.rest.proxy.utility.GetApiKeyPermissionsResponse
            text/event-stream:
              schema:
                $ref: >-
                  #/components/schemas/coinbase.retail.rest.proxy.utility.GetApiKeyPermissionsResponse
        default:
          description: An unexpected error response.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/grpc.gateway.runtime.Error'
            text/event-stream:
              schema:
                $ref: '#/components/schemas/grpc.gateway.runtime.Error'
      tags:
        - Data API
x-readme:
  explorer-enabled: false
  samples-enabled: false
  headers:
    - key: CB-ACCESS-KEY
      value: $ACCESS_KEY
    - key: CB-ACCESS-SIGN
      value: $SIGNATURE
    - key: CB-ACCESS-TIMESTAMP
      value: $TIMESTAMP
servers:
  - url: https://api.coinbase.com
components:
  requestBodies:
    coinbase.public_api.authed.retail_brokerage_api.EditOrderRequest:
      content:
        application/json:
          schema:
            $ref: >-
              #/components/schemas/coinbase.public_api.authed.retail_brokerage_api.EditOrderRequest
      required: true
  schemas:
    coinbase.bin_check.CardInfo:
      type: object
      properties:
        match_found:
          type: boolean
          title: >-
            used to check for an empty result without throwing an error
            clientside

            if false, then all other fields are left blank
        type:
          title: Card's Type
          allOf:
            - $ref: '#/components/schemas/coinbase.bin_check.CardInfo.Type'
        issuer:
          type: string
          title: Card's issuer
        issuer_country_code:
          type: string
          title: Card's country
        prepaid:
          type: boolean
          title: Flag to check if is a prepaid card or not
        corporate:
          type: boolean
          title: Flag to check if is corporate card or not
        consumer:
          type: boolean
        visa:
          allOf:
            - $ref: '#/components/schemas/coinbase.bin_check.VisaInfo'
        mastercard:
          allOf:
            - $ref: '#/components/schemas/coinbase.bin_check.MastercardInfo'
        use_3ds:
          type: boolean
          title: Flag to check if card uses 3D Secure
      title: CardInfo message
    coinbase.bin_check.CardInfo.Type:
      type: string
      enum:
        - UNKNOWN
        - CREDIT
        - DEBIT
      default: UNKNOWN
      title: Card Type enum
    coinbase.bin_check.MastercardInfo:
      type: object
      properties:
        fast_funds_supported:
          type: boolean
          title: >-
            Are fast funds supported by this card?

            If a card is "fast fund supported" the cardholder can access
            incoming funds almost instantly.

            In other words, will this card receive instant payouts?
      title: MastercardInfo info
    coinbase.bin_check.VisaInfo:
      type: object
      properties:
        oct_supported:
          type: boolean
          title: >-
            Are Original Credit Transactions (OCTs) supported by this card?

            An OCT is a method to transfer funds directly to a cardholder's
            account.

            In other words, can this card receive payouts?
        fast_funds_supported:
          type: boolean
          title: >-
            Are fast funds supported by this card?

            If a card is "fast fund supported" the cardholder can access
            incoming funds almost instantly.

            In other words, will this card receive instant payouts?
      title: VisaInfo message
    coinbase.brokerage.types.Decimal:
      type: object
      properties:
        value:
          type: string
          description: String representation allows for unlimited precision.
      description: Represents a decimal number with precision.
    coinbase.consumer.shared.common.Amount:
      type: object
      properties:
        value:
          type: string
        currency:
          type: string
        cbrn:
          type: string
          title: >-
            CBRN Format: version:type:network:sub-network:id:sub-id

            Example:
            v1:token:solana:mainnet:EPjFWdd5AufqSSqeM2qN1xzybapC8G4wEGGkZwyTDt1v:
      title: Message that represents the monetary amount.
    coinbase.consumer.shared.common.Link:
      type: object
      properties:
        text:
          type: string
        url:
          type: string
      title: |-
        In-app hyperlink, commonly used to reference support pages.
        e.g. Link(text: "Learn More", url: "https://help.coinbase.com/...")
    coinbase.intx_common.Asset:
      type: object
      properties:
        asset_id:
          type: string
        asset_uuid:
          type: string
        asset_name:
          type: string
        status:
          type: string
        collateral_weight:
          type: string
        account_collateral_limit:
          type: string
        ecosystem_collateral_limit_breached:
          type: boolean
        asset_icon_url:
          type: string
        supported_networks_enabled:
          type: boolean
    coinbase.intx_common.Balance:
      type: object
      properties:
        asset:
          allOf:
            - $ref: '#/components/schemas/coinbase.intx_common.Asset'
        quantity:
          type: string
        hold:
          type: string
        transfer_hold:
          type: string
        collateral_value:
          type: string
        collateral_weight:
          type: string
        max_withdraw_amount:
          type: string
        loan:
          type: string
        loan_collateral_requirement_usd:
          type: string
        pledged_quantity:
          type: string
        max_portfolio_transfer_amount:
          type: string
    coinbase.intx_common.GetBalanceSummaryResponse:
      type: object
      properties:
        portfolio_balances:
          type: array
          items:
            $ref: '#/components/schemas/coinbase.intx_common.PortfolioBalance'
    coinbase.intx_common.PortfolioBalance:
      type: object
      properties:
        portfolio_uuid:
          type: string
        balances:
          type: array
          items:
            $ref: '#/components/schemas/coinbase.intx_common.Balance'
        is_margin_limit_reached:
          type: boolean
    coinbase.intx_common.PortfolioLiquidationStatus:
      type: string
      enum:
        - PORTFOLIO_LIQUIDATION_STATUS_UNSPECIFIED
        - PORTFOLIO_LIQUIDATION_STATUS_CANCELING
        - PORTFOLIO_LIQUIDATION_STATUS_AUTO_LIQUIDATING
        - PORTFOLIO_LIQUIDATION_STATUS_LSP_ASSIGNMENT
        - PORTFOLIO_LIQUIDATION_STATUS_CUSTOMER_ASSIGNMENT
        - PORTFOLIO_LIQUIDATION_STATUS_MANUAL
        - PORTFOLIO_LIQUIDATION_STATUS_NOT_LIQUIDATING
      default: PORTFOLIO_LIQUIDATION_STATUS_UNSPECIFIED
    coinbase.intx_common.PortfolioMarginFlags:
      type: string
      enum:
        - PORTFOLIO_MARGIN_FLAGS_UNSPECIFIED
        - PORTFOLIO_MARGIN_FLAGS_IN_LIQUIDATION
      default: PORTFOLIO_MARGIN_FLAGS_UNSPECIFIED
    coinbase.intx_common.PortfolioMarginType:
      type: string
      enum:
        - MARGIN_TYPE_UNSPECIFIED
        - MARGIN_TYPE_CROSS
        - MARGIN_TYPE_ISOLATED
      default: MARGIN_TYPE_UNSPECIFIED
    coinbase.intx_common.PositionSide:
      type: string
      enum:
        - POSITION_SIDE_UNKNOWN
        - POSITION_SIDE_LONG
        - POSITION_SIDE_SHORT
      default: POSITION_SIDE_UNKNOWN
    coinbase.payments.common.Address:
      type: object
      properties:
        address1:
          type: string
        address2:
          type: string
        city:
          type: string
        state:
          type: string
        postal_code:
          type: string
        country:
          type: string
        uuid:
          type: string
        id:
          type: string
    coinbase.payments.common.DigitalWalletDetails:
      type: object
      properties:
        nonce:
          type: string
        correlation_id:
          type: string
        version:
          type: string
          title: 3ds version from samsung pay ex `100`
    coinbase.payments.common.Money:
      type: object
      properties:
        amount:
          type: string
        currency:
          type: string
      description: This is a clone of
      title: A quantity of money
    coinbase.payments.common.payment_methods.AccountNameInquiryDetails:
      type: object
      properties:
        first_name_match:
          allOf:
            - $ref: >-
                #/components/schemas/coinbase.payments.common.payment_methods.MatchResult
        middle_name_match:
          allOf:
            - $ref: >-
                #/components/schemas/coinbase.payments.common.payment_methods.MatchResult
        last_name_match:
          allOf:
            - $ref: >-
                #/components/schemas/coinbase.payments.common.payment_methods.MatchResult
        name_match_indicator:
          allOf:
            - $ref: >-
                #/components/schemas/coinbase.payments.common.payment_methods.NameMatchIndicator
      description: |-
        Results from Visa Account Name Inquiry, which verifies cardholder name
        components against the name on file at the issuing bank.
      title: Account Name Inquiry (ANI)
    coinbase.payments.common.payment_methods.Address:
      type: object
      properties:
        address1:
          type: string
        address2:
          type: string
        city:
          type: string
        state:
          type: string
        postal_code:
          type: string
        country:
          type: string
        uuid:
          type: string
        id:
          type: string
    coinbase.payments.common.payment_methods.AddressVerificationInfo:
      type: object
      properties:
        source:
          type: string
        avs_street_address:
          allOf:
            - $ref: >-
                #/components/schemas/coinbase.payments.common.payment_methods.AddressVerificationStatus
        avs_postal_code:
          allOf:
            - $ref: >-
                #/components/schemas/coinbase.payments.common.payment_methods.AddressVerificationStatus
      title: Address Verification
    coinbase.payments.common.payment_methods.AddressVerificationStatus:
      type: string
      enum:
        - ADDRESS_VERIFICATION_STATUS_UNSPECIFIED
        - ADDRESS_VERIFICATION_STATUS_MATCH
        - ADDRESS_VERIFICATION_STATUS_NO_MATCH
      default: ADDRESS_VERIFICATION_STATUS_UNSPECIFIED
    coinbase.payments.common.payment_methods.Allocation:
      type: object
      properties:
        id:
          type: string
        legs:
          type: array
          items:
            $ref: >-
              #/components/schemas/coinbase.payments.common.payment_methods.AllocationLeg
        is_netted:
          type: boolean
    coinbase.payments.common.payment_methods.AllocationLeg:
      type: object
      properties:
        id:
          type: string
        movements:
          type: array
          items:
            $ref: >-
              #/components/schemas/coinbase.payments.common.payment_methods.FundMovement
        is_netted:
          type: boolean
    coinbase.payments.common.payment_methods.ApplePay:
      type: object
      properties:
        braintree:
          allOf:
            - $ref: >-
                #/components/schemas/coinbase.payments.common.payment_methods.ApplePay.BraintreeData
        apple_pay:
          allOf:
            - $ref: >-
                #/components/schemas/coinbase.payments.common.DigitalWalletDetails
        user_id:
          type: string
        postal_code:
          type: string
          title: >-
            The following fields can be populated on the PM after an order

            is submitted in the InstructionResponse. They should not be filled
            in

            a normal order Instruction though
        customer_name:
          type: string
        address:
          allOf:
            - $ref: >-
                #/components/schemas/coinbase.payments.common.payment_methods.Address
        six_digit_bin:
          type: string
        last_four:
          type: string
        issuing_country:
          type: string
        issuing_bank:
          type: string
        product_id:
          type: string
        customer_dob:
          type: string
          title: Date of birth in YYYY-MM-DD format
        billing_address_id:
          type: string
          title: Users address id
        currency:
          type: string
          title: Currency of the transaction
        scheme:
          allOf:
            - $ref: >-
                #/components/schemas/coinbase.payments.common.payment_methods.ApplePay.Scheme
        prepaid:
          allOf:
            - $ref: >-
                #/components/schemas/coinbase.payments.common.payment_methods.ApplePay.Result
        debit:
          allOf:
            - $ref: >-
                #/components/schemas/coinbase.payments.common.payment_methods.ApplePay.Result
      title: uniquely identifies a user's Coinbase account
    coinbase.payments.common.payment_methods.ApplePay.BraintreeData:
      type: object
      properties:
        nonce:
          type: string
        correlation_id:
          type: string
    coinbase.payments.common.payment_methods.ApplePay.Result:
      type: string
      enum:
        - UNCERTAIN
        - 'TRUE'
        - 'FALSE'
      default: UNCERTAIN
    coinbase.payments.common.payment_methods.ApplePay.Scheme:
      type: string
      enum:
        - UNKNOWN
        - VISA
        - MASTERCARD
      default: UNKNOWN
    coinbase.payments.common.payment_methods.ArgentineBankAccountDetails:
      type: object
      properties:
        tax_id:
          type: string
        cbu:
          type: string
    coinbase.payments.common.payment_methods.BancomatPay:
      type: object
      properties:
        customer_name:
          type: string
        account:
          allOf:
            - $ref: >-
                #/components/schemas/coinbase.payments.common.payment_methods.BancomatPayAccount
    coinbase.payments.common.payment_methods.BancomatPayAccount:
      type: object
      properties:
        phone_number:
          type: string
    coinbase.payments.common.payment_methods.BankAccount:
      type: object
      properties:
        customer_account_type:
          type: string
        customer_account_number:
          type: string
        customer_routing_number:
          type: string
        customer_name:
          type: string
        currency:
          type: string
          title: default USD in code
        bank_name:
          type: string
          title: This is called 'name' in PMSvc ACH proto
        ach_entry_class:
          type: string
        verification_method:
          type: string
          title: default 'cdv' in code
        cdv_amount_1:
          allOf:
            - $ref: '#/components/schemas/coinbase.payments.shared.Money'
        cdv_amount_2:
          allOf:
            - $ref: '#/components/schemas/coinbase.payments.shared.Money'
        ach_invalid_account:
          type: boolean
        ach_bad_account:
          type: boolean
        received_non_nsf_return:
          type: boolean
        giactInfo:
          allOf:
            - $ref: >-
                #/components/schemas/coinbase.payments.common.payment_methods.GiactInfo
        vendor_verification_status:
          allOf:
            - $ref: >-
                #/components/schemas/coinbase.payments.common.payment_methods.VendorVerificationStatus
        plaid_verification_info:
          description: Information about the Plaid Info linked through Plaid.
          allOf:
            - $ref: >-
                #/components/schemas/coinbase.payments.common.payment_methods.PlaidInfo
        stripe_verification_info:
          description: Information about the financial connections linked through Stripe.
          allOf:
            - $ref: >-
                #/components/schemas/coinbase.payments.common.payment_methods.StripeFinancialConnectionsInfo
    coinbase.payments.common.payment_methods.BankingCircleNowDetails:
      type: object
      properties:
        iban:
          type: string
        currency:
          type: string
        customer_payment_name:
          type: string
    coinbase.payments.common.payment_methods.BankingCircleToken:
      type: object
      properties:
        mandate_id:
          type: string
          description: >-
            mandate_id is a 32 char long unique identifier of the account token
            (mandate) on Banking Circle side.
        active:
          type: boolean
          title: 'AIDoc: Whether the mandate is active'
        balance_check_supported:
          type: boolean
          title: 'AIDoc: Whether balance check is supported for this mandate'
        hosted_page_id:
          type: string
          description: >-
            hosted_page_id is the unique identifier for the hosted page used for
            creating the mandate object.

            It is updated when a new mandate is created (i.e. when the
            mandate_id is updated).
      description: >-
        AIDoc: BankingCircleToken is used to embed information related to an
        account token for SEPA Direct Debit payments with Banking Circle.
    coinbase.payments.common.payment_methods.BlikDetails:
      type: object
      properties:
        email:
          type: string
          title: The RFC-compliant email address of the account holder. (Optional)
        country:
          type: string
          description: >-
            The country where the payer's bank account is located. Populated for
            all Blik payments in the PMSvc API response.
        account_holder:
          type: string
          description: >-
            Account holder names. This field is optional and may not be
            populated for all Blik payments in the PMSvc API response.
      title: >-
        https://developerhub.ppro.com/simple-api/docs/blik-redirect#specific-input-parameters-for-the-transaction-call
    coinbase.payments.common.payment_methods.BlockchainAddress:
      type: object
      properties:
        address:
          type: string
        destination_tag:
          type: string
    coinbase.payments.common.payment_methods.BlockchainTransaction:
      type: object
      properties:
        hsh:
          type: string
        height:
          type: integer
          format: int32
        normalized_hash:
          type: string
          description: >-
            optional, for cases such as Scot asset deposit/withdrawal, needed
            for Nova & Wallets data stream.
    coinbase.payments.common.payment_methods.CTN:
      type: object
      properties:
        id:
          type: string
    coinbase.payments.common.payment_methods.CadWireDetails:
      type: object
      properties:
        account_number:
          type: string
        customer_payment_name:
          type: string
        account_address:
          type: string
        institution_number:
          type: string
          title: >-
            Part of the financial institution's routing information: the 3-digit
            Canadian financial institution number
        transit_number:
          type: string
          title: >-
            Part of the financial institution's routing information: the 5-digit
            branch transit number
        bank_address1:
          type: string
          title: The address of the customer's bank, required for outbound payments
        institution_name:
          type: string
          title: >-
            Name of the user's institution that was used for the CAD Wire
            transaction
    coinbase.payments.common.payment_methods.Card:
      type: object
      properties:
        first_data_token:
          title: Vendor-Specific Tokens and Parameters
          allOf:
            - $ref: >-
                #/components/schemas/coinbase.payments.common.payment_methods.FirstDataToken
        merchant:
          allOf:
            - $ref: >-
                #/components/schemas/coinbase.payments.common.payment_methods.Merchant
        vault_token:
          allOf:
            - $ref: >-
                #/components/schemas/coinbase.payments.common.payment_methods.VaultToken
        worldpay_params:
          allOf:
            - $ref: >-
                #/components/schemas/coinbase.payments.common.payment_methods.WorldpayParams
        checkout_token:
          allOf:
            - $ref: >-
                #/components/schemas/coinbase.payments.common.payment_methods.CheckoutToken
        stripe_params:
          allOf:
            - $ref: >-
                #/components/schemas/coinbase.payments.common.payment_methods.StripeParams
        six_digit_bin:
          type: string
          title: Card Identification
        last_four:
          type: string
        eight_digit_bin:
          type: string
        card_sub_brand:
          type: string
        card_brand:
          type: string
        obfuscated_pan:
          type: string
        bin_info:
          allOf:
            - $ref: '#/components/schemas/coinbase.bin_check.CardInfo'
        scheme:
          title: Card Network and Issuer Information
          allOf:
            - $ref: >-
                #/components/schemas/coinbase.payments.common.payment_methods.Card.Scheme
        issuer:
          type: string
        issuer_country_code:
          type: string
        address:
          title: Customer Information
          allOf:
            - $ref: >-
                #/components/schemas/coinbase.payments.common.payment_methods.Address
        phone_number:
          type: string
        user_id:
          type: string
        postal_code:
          type: string
        customer_info:
          allOf:
            - $ref: >-
                #/components/schemas/coinbase.payments.common.payment_methods.CustomerInfo
        expiry_date:
          title: Card Expiration and Timestamps
          allOf:
            - $ref: >-
                #/components/schemas/coinbase.payments.common.payment_methods.ExpiryDate
        cdv_method:
          type: string
          title: Card Debit Verification (CDV)
        cdv_amount_1:
          allOf:
            - $ref: '#/components/schemas/coinbase.payments.shared.Money'
        cdv_amount_2:
          allOf:
            - $ref: '#/components/schemas/coinbase.payments.shared.Money'
        worldpay_card_cdv_status:
          allOf:
            - $ref: >-
                #/components/schemas/coinbase.payments.common.payment_methods.WorldpayCardCdvStatus
        previous_scheme_tx_id:
          type: string
          title: Transaction and Scheme References
        initial_scheme_tx_id:
          type: string
        rejected:
          type: boolean
          title: Rejection Status
        rejected_at:
          type: string
          format: RFC3339 Timestamp
        rejection_count:
          type: integer
          format: int32
        rejected_via_purchase:
          type: boolean
        account_updater_updated_at:
          type: string
          format: RFC3339 Timestamp
          title: Account Updater
        account_updater_reason:
          type: string
        account_updater_status:
          type: string
        almost_expired_notified:
          type: boolean
          title: Migration and Notification Status
        is_migrated_card:
          type: boolean
        migrated_created_at:
          type: string
          format: RFC3339 Timestamp
        card_source:
          title: Metadata
          allOf:
            - $ref: >-
                #/components/schemas/coinbase.payments.common.payment_methods.CardSource
        added_via_buy_widget:
          type: boolean
        encrypted_data:
          type: string
        verification_method:
          type: string
        coinbase_credit_card_params:
          title: Coinbase Credit Card
          allOf:
            - $ref: >-
                #/components/schemas/coinbase.payments.common.payment_methods.CoinbaseCreditCardParams
        address_verification_info:
          title: Risk Verification
          allOf:
            - $ref: >-
                #/components/schemas/coinbase.payments.common.payment_methods.AddressVerificationInfo
        account_name_inquiry:
          allOf:
            - $ref: >-
                #/components/schemas/coinbase.payments.common.payment_methods.AccountNameInquiryDetails
        customer_name:
          type: string
          title: Deprecated Fields
        customer_first_name:
          type: string
        customer_last_name:
          type: string
        customer_dob:
          allOf:
            - $ref: >-
                #/components/schemas/coinbase.payments.common.payment_methods.Card.Dob
      title: |-
        The card as a payment method source or target
        Next available field number: 52
    coinbase.payments.common.payment_methods.Card.Dob:
      type: object
      properties:
        month:
          type: string
        day:
          type: string
        year:
          type: string
    coinbase.payments.common.payment_methods.Card.Scheme:
      type: string
      enum:
        - UNKNOWN
        - VISA
        - MASTERCARD
      default: UNKNOWN
    coinbase.payments.common.payment_methods.CardSource:
      type: string
      enum:
        - SOURCE_UNKNOWN
        - CARD_IO_SCAN
        - MANUAL_ENTRY
        - DYNETI_SCAN
        - DYNETI_SCAN_AND_MANUAL
        - AUTO_ASSIGNED
      default: SOURCE_UNKNOWN
      title: Card Source Identification
    coinbase.payments.common.payment_methods.Cbit:
      type: object
      properties:
        cbit_wallet_address:
          type: string
          title: 'AIDoc: The wallet address for the CBIT payment method'
        customers_bank_account_id:
          type: string
          title: 'AIDoc: The customer''s bank account identifier'
        currency:
          type: string
          title: 'AIDoc: The currency code for the payment method'
      title: 'AIDoc: Represents details for a CBIT payment method'
    coinbase.payments.common.payment_methods.CheckoutPaymentLink:
      type: object
      properties:
        payment_link_id:
          type: string
      title: unique identifier for a checkout.com payment link
    coinbase.payments.common.payment_methods.CheckoutToken:
      type: object
      properties:
        source_id:
          type: string
          title: >-
            A payment source identifier from Checkout with format
            ^(src)_(\w{26})$

            Example: src_nwd3m4in3hkuddfpjsaevunhdy
    coinbase.payments.common.payment_methods.CoinbaseAccount:
      type: object
      properties:
        account_id:
          type: string
      title: uniquely identifies a user's Coinbase account
    coinbase.payments.common.payment_methods.CoinbaseCreditCardParams:
      type: object
      properties:
        credit_card_account_id:
          type: string
          title: Account ID for the CB card account in CardService
      title: >-
        Card params for CB cards which will be used to charge CB1 subscription
        fees through the cb credit card processor
    coinbase.payments.common.payment_methods.CustodialPool:
      type: object
      properties:
        name:
          type: string
        network:
          type: string
        fiat_id:
          type: string
      title: >-
        note this is to support transaction logs where everything is expected to
        be a pm for a transfers source and target
    coinbase.payments.common.payment_methods.CustomerInfo:
      type: object
      properties:
        full_name:
          type: string
        first_name:
          type: string
        last_name:
          type: string
        dob:
          allOf:
            - $ref: >-
                #/components/schemas/coinbase.payments.common.payment_methods.Dob
        nationality:
          type: string
          description: >-
            The 2-letter ISO country code representing the nationality of the
            customer initiating the card payment.

            Primarily used by our Checkout.com processor to reduce the number of
            RFIs (requests for information) needed to verify transactions.
        email:
          type: string
          title: email address that will be sent in payins by checkout processor
    coinbase.payments.common.payment_methods.DAppWalletAccount:
      type: object
      properties:
        user_uuid:
          type: string
        network:
          type: string
        cohort_id:
          type: string
        signing_backend:
          type: string
        currency:
          type: string
      title: uniquely identifies a user's dapp wallet account/address
    coinbase.payments.common.payment_methods.DAppWalletBlockchainAddress:
      type: object
      properties:
        network:
          type: string
        address:
          type: string
        cohort_id:
          type: string
        user_uuid:
          type: string
        pool:
          type: string
    coinbase.payments.common.payment_methods.DefaultAccount:
      type: object
      properties:
        user_uuid:
          type: string
        currency:
          type: string
    coinbase.payments.common.payment_methods.DenebIMPS:
      type: object
      properties:
        ifsc_code:
          type: string
        account_number:
          type: string
        customer_first_name:
          type: string
        customer_last_name:
          type: string
        email:
          type: string
        phone_number:
          type: string
        pan:
          type: string
        address:
          allOf:
            - $ref: >-
                #/components/schemas/coinbase.payments.common.payment_methods.Address
    coinbase.payments.common.payment_methods.DenebUPI:
      type: object
      properties:
        vpa_id:
          type: string
        customer_first_name:
          type: string
        customer_last_name:
          type: string
        email:
          type: string
        phone_number:
          type: string
        pan:
          type: string
        address:
          allOf:
            - $ref: >-
                #/components/schemas/coinbase.payments.common.payment_methods.Address
    coinbase.payments.common.payment_methods.DerivativeSettlement:
      type: object
      properties:
        account_settlements:
          type: array
          items:
            $ref: >-
              #/components/schemas/coinbase.payments.common.payment_methods.DerivativeSettlement.AccountSettlement
          title: derivative EOD settlement can involve one or more fund movements
        equity_reset:
          title: optionally reset CFM equity account
          allOf:
            - $ref: >-
                #/components/schemas/coinbase.payments.common.payment_methods.DerivativeSettlement.EquityReset
    coinbase.payments.common.payment_methods.DerivativeSettlement.AccountSettlement:
      type: object
      properties:
        amount:
          allOf:
            - $ref: '#/components/schemas/coinbase.payments.common.Money'
        source_ledger_account:
          allOf:
            - $ref: >-
                #/components/schemas/coinbase.payments.common.payment_methods.LedgerAccount
        source_ledger_named_account:
          allOf:
            - $ref: >-
                #/components/schemas/coinbase.payments.common.payment_methods.LedgerNamedAccount
        target_ledger_account:
          allOf:
            - $ref: >-
                #/components/schemas/coinbase.payments.common.payment_methods.LedgerAccount
        target_ledger_named_account:
          allOf:
            - $ref: >-
                #/components/schemas/coinbase.payments.common.payment_methods.LedgerNamedAccount
        hold_id_to_replace:
          type: string
          title: Deprecated, use existing_hold_id instead
        new_hold_id:
          type: string
          title: |-
            account settlement can optionally replace an existing hold with
            `hold_id_to_replace` to a new hold with `new_hold_id` and amount
            of `new_hold_amount`
        new_hold_amount:
          allOf:
            - $ref: '#/components/schemas/coinbase.payments.common.Money'
        existing_hold_id:
          type: string
    coinbase.payments.common.payment_methods.DerivativeSettlement.EquityReset:
      type: object
      properties:
        amount:
          allOf:
            - $ref: '#/components/schemas/coinbase.payments.common.Money'
        equity_account:
          allOf:
            - $ref: >-
                #/components/schemas/coinbase.payments.common.payment_methods.LedgerAccount
    coinbase.payments.common.payment_methods.DirectDeposit:
      type: object
      properties:
        direct_deposit_account:
          type: string
    coinbase.payments.common.payment_methods.Dob:
      type: object
      properties:
        month:
          type: string
        day:
          type: string
        year:
          type: string
      title: Customer Information
    coinbase.payments.common.payment_methods.Eft:
      type: object
      properties:
        account:
          allOf:
            - $ref: >-
                #/components/schemas/coinbase.payments.common.payment_methods.Eft.Account
    coinbase.payments.common.payment_methods.Eft.Account:
      type: object
      properties:
        account_name:
          type: string
          title: Name of the account fulfilling the Request Money Transaction
        account_phone_number:
          type: string
          title: Phone number of the account fulfilling the Request Money Transaction
        account_email:
          type: string
          title: Email of the account fulfilling the Request Money Transaction
        institution_number:
          type: string
          description: >-
            Institution Number: a 3-digit code that tells you which bank the
            account belongs to — unique for every Canadian bank.
        transit_number:
          type: string
          description: >-
            Transit Number: a 5-digit code that tells which branch of the bank
            the account was created at — it is unique to each bank branch.
        account_number:
          type: string
          description: >-
            Account Number: a 7-digit code that identifies the account within
            the branch and bank entered.
        provider_id:
          type: string
        provider_name:
          type: string
        trustly_account_token_status:
          allOf:
            - $ref: >-
                #/components/schemas/coinbase.payments.common.payment_methods.Eft.TrustlyAccountTokenStatus
        account_type:
          type: string
    coinbase.payments.common.payment_methods.Eft.TrustlyAccountTokenStatus:
      type: string
      enum:
        - TRUSTLY_TOKEN_STATUS_UNSPECIFIED
        - TRUSTLY_TOKEN_STATUS_ACTIVE
        - TRUSTLY_TOKEN_STATUS_RELINK_NEEDED
      default: TRUSTLY_TOKEN_STATUS_UNSPECIFIED
    coinbase.payments.common.payment_methods.EmailAddress:
      type: object
      properties:
        value:
          type: string
    coinbase.payments.common.payment_methods.ExpiryDate:
      type: object
      properties:
        month:
          type: string
        year:
          type: string
      title: Basic Card Information
    coinbase.payments.common.payment_methods.ExternalPaymentMethod:
      type: object
      properties:
        payment_method_id:
          type: string
      title: >-
        uniquely identifies am external payment method in the Payment Method
        Service
    coinbase.payments.common.payment_methods.Fedwire:
      type: object
      properties:
        routing_number:
          type: string
          title: 'AIDoc: The routing number for the fedwire payment method'
        account_holder:
          title: 'AIDoc: The account holder information'
          allOf:
            - $ref: >-
                #/components/schemas/coinbase.payments.common.payment_methods.FedwireAccount
        bank:
          title: 'AIDoc: The primary bank institution details'
          allOf:
            - $ref: >-
                #/components/schemas/coinbase.payments.common.payment_methods.FedwireInstitution
        intermediary_bank:
          title: 'AIDoc: The intermediary bank institution details, if applicable'
          allOf:
            - $ref: >-
                #/components/schemas/coinbase.payments.common.payment_methods.FedwireInstitution
        currency:
          type: string
          title: 'AIDoc: The currency code for the payment method'
        fiat_id:
          type: string
          title: >-
            AIDoc: ONLY used by prime admin - Venue Entity Type reference code
            onboarding
        rejection_count_v2:
          type: integer
          format: int32
          title: 'AIDoc: The number of rejections for this fedwire payment method'
      title: >-
        Fedwire contains all information necessary to initiate a payment to/from
        a fedwire eligible bank account.

        Format based on the Fedwire Format Reference Guide Nov 2014
    coinbase.payments.common.payment_methods.FedwireAccount:
      type: object
      properties:
        legal_name:
          type: string
          title: 'AIDoc: The legal name of the account holder'
        account_number:
          type: string
          title: 'AIDoc: The account number at the financial institution'
        address:
          title: 'AIDoc: The address associated with the account'
          allOf:
            - $ref: >-
                #/components/schemas/coinbase.payments.common.payment_methods.FedwireAddress
      title: >-
        FedwireAccount represents an account at a financial institution eligible
        for Fedwire
    coinbase.payments.common.payment_methods.FedwireAddress:
      type: object
      properties:
        lines:
          type: array
          items:
            type: string
          description: >-
            AIDoc: The address lines passed onto the Fedwire network. Must be at
            least 2 non-empty lines. Only 3 lines will be passed on.
        country_code:
          type: string
          description: >-
            AIDoc: A 2-letter country code ISO-3166-1 Alpha 2. For example US,
            CA or SE.
        city:
          type: string
          title: 'AIDoc: The city associated with the Fedwire address'
        state:
          type: string
          title: 'AIDoc: The state or province associated with the Fedwire address'
        postal_code:
          type: string
          title: >-
            AIDoc: The postal code or ZIP code associated with the Fedwire
            address
      title: FedwireAddress is an address for Fedwire payment methods
    coinbase.payments.common.payment_methods.FedwireInstitution:
      type: object
      properties:
        name:
          type: string
          title: 'AIDoc: The name of the financial institution (must be present)'
        address:
          title: >-
            AIDoc: The address of the financial institution (must be present for
            Fedwire payments)
          allOf:
            - $ref: >-
                #/components/schemas/coinbase.payments.common.payment_methods.FedwireAddress
        identifier:
          type: string
          title: >-
            Required field that will be populated with a value according to the
            identifier_code.

            1. When identifier_code is 'F', this field represents a 9 digit ABA
            code and is likely to match

            the value of the `routing_number` field.

            Ex: "026009593"

            2. When identifier_code is 'B', this field represents an 8-11
            character SWIFT code, it *should* identify the same bank as the ABA
            code in

            `routing_number`. Some implementations (Crossriver) provide the
            Swift here instead

            Ex: "BOFAUS3N"

            3. When identifier_code is 'D', this field represents an account
            number. This usually means it is a "For Further Credit" (FFC) to the

            account number and there is an intermediary bank involved.

            Ex: "000004121345797"
        type:
          title: 'AIDoc: The type of institution identifier'
          allOf:
            - $ref: >-
                #/components/schemas/coinbase.payments.common.payment_methods.FedwireInstitution.Type
        identifier_code:
          type: string
          title: >-
            The beneficiary bank id code is a standard identifier which tells us
            what the beneficiary bank id value represents.

            B - SWIFT Bank Identifier Code (BIC)

            C - CHIPS Participant

            D - Demand Deposit Account (DDA) Number

            F - Fed Routing Number

            T - SWIFT BIC or Bank Entity Identifier (BEI) and Account Number

            U - CHIPS Identifier
      description: >-
        FedwireInstitution is usually a bank, but can also be credit unions or
        other financial institutions.
    coinbase.payments.common.payment_methods.FedwireInstitution.Type:
      type: string
      enum:
        - CHIPS_IDENTIFIER
        - CHIPS_PARTICIPANT
        - DDA
        - FEDWIRE
        - SWIFT_BIC
        - SWIFT_BIC_OR_BEI_AND_ACCOUNT
        - PASSPORT_NUMBER
        - TAX_IDENTIFICATION_NUMBER
        - DRIVERS_LICENSE_NUMBER
        - ALIEN_REGISTRATION_NUMBER
        - CORPORATE_IDENTIFICATION_NUMBER
        - OTHER_IDENTIFICATION
        - UNKNOWN
      default: CHIPS_IDENTIFIER
    coinbase.payments.common.payment_methods.FirstDataToken:
      type: object
      properties:
        value:
          type: string
        store_id:
          type: string
        id:
          type: string
      title: Vendor Tokens
    coinbase.payments.common.payment_methods.FundMovement:
      type: object
      properties:
        id:
          type: string
        source_account:
          allOf:
            - $ref: >-
                #/components/schemas/coinbase.payments.common.payment_methods.LedgerAccount
        destination_account:
          allOf:
            - $ref: >-
                #/components/schemas/coinbase.payments.common.payment_methods.LedgerAccount
        source_currency:
          type: string
        target_currency:
          type: string
        amount:
          allOf:
            - $ref: '#/components/schemas/coinbase.payments.common.Money'
        fee:
          allOf:
            - $ref: '#/components/schemas/coinbase.payments.common.Money'
    coinbase.payments.common.payment_methods.GiactInfo:
      type: object
      properties:
        giact_item_id:
          type: string
        giact_bank_result:
          type: string
        giact_customer_result:
          type: string
        giact_status:
          type: string
        giact_last_updated_at:
          type: string
          format: RFC3339 Timestamp
        giact_account_added_date:
          type: string
          format: RFC3339 Timestamp
        giact_account_last_updated_date:
          type: string
          format: RFC3339 Timestamp
    coinbase.payments.common.payment_methods.GooglePay:
      type: object
      properties:
        braintree:
          allOf:
            - $ref: >-
                #/components/schemas/coinbase.payments.common.payment_methods.GooglePay.BraintreeData
        google_pay:
          allOf:
            - $ref: >-
                #/components/schemas/coinbase.payments.common.DigitalWalletDetails
        user_id:
          type: string
        postal_code:
          type: string
          title: >-
            The following fields can be populated on the PM after an order

            is submitted in the InstructionResponse. They should not be filled
            in

            a normal order Instruction though
        customer_name:
          type: string
        address:
          allOf:
            - $ref: >-
                #/components/schemas/coinbase.payments.common.payment_methods.Address
        six_digit_bin:
          type: string
        last_four:
          type: string
        issuing_country:
          type: string
        issuing_bank:
          type: string
        product_id:
          type: string
        customer_dob:
          type: string
          title: Date of birth in YYYY-MM-DD format
        billing_address_id:
          type: string
          title: Users address id
        currency:
          type: string
          title: Currency of the transaction
        scheme:
          allOf:
            - $ref: >-
                #/components/schemas/coinbase.payments.common.payment_methods.GooglePay.Scheme
        prepaid:
          allOf:
            - $ref: >-
                #/components/schemas/coinbase.payments.common.payment_methods.GooglePay.Result
        debit:
          allOf:
            - $ref: >-
                #/components/schemas/coinbase.payments.common.payment_methods.GooglePay.Result
      title: uniquely identifies a user's Coinbase account
    coinbase.payments.common.payment_methods.GooglePay.BraintreeData:
      type: object
      properties:
        nonce:
          type: string
        correlation_id:
          type: string
    coinbase.payments.common.payment_methods.GooglePay.Result:
      type: string
      enum:
        - UNCERTAIN
        - 'TRUE'
        - 'FALSE'
      default: UNCERTAIN
    coinbase.payments.common.payment_methods.GooglePay.Scheme:
      type: string
      enum:
        - UNKNOWN
        - VISA
        - MASTERCARD
      default: UNKNOWN
    coinbase.payments.common.payment_methods.HotWallet:
      type: object
      properties:
        network:
          type: string
        address:
          type: string
    coinbase.payments.common.payment_methods.Ideal:
      type: object
      properties:
        currency:
          type: string
        iban:
          type: string
        bic:
          type: string
        bank_name:
          type: string
        customer_payment_name:
          type: string
        customer_country_code:
          type: string
      title: ''
    coinbase.payments.common.payment_methods.IdentityContractCall:
      type: object
      properties:
        network:
          type: string
        address:
          type: string
    coinbase.payments.common.payment_methods.IndiaBankAccountDetails:
      type: object
      properties:
        account_number:
          type: string
          title: >-
            Beneficiary bank account number (9 - 18 alphanumeric character
            limit)
        ifsc_code:
          type: string
          title: >-
            An alphanumeric code used to uniquely identify every bank branch
            participating in online fund transfers (IMPS, NEFT, RTGS) within
            India. The format is typically XXXX0YYYYYY, where the first four
            characters represent the bank's name, the fifth character is always
            a zero, and the last six characters represent the specific branch
            code
        bank_name:
          type: string
          title: Beneficiary bank name
        customer_first_name:
          type: string
          title: >-
            First name of the customer

            Not used when interacting with vendors (e.g., Neokred) that return
            full name in account verification flow
        customer_last_name:
          type: string
          title: >-
            Last name of the customer

            Not used when interacting with vendors (e.g., Neokred) that return
            full name in account verification flow
        email:
          type: string
          title: Beneficiary email address, string in email Id format
        phone_number:
          type: string
          title: >-
            Beneficiary phone number registered in India (only digits, 10
            characters after stripping +91)
        pan_number:
          type: string
          title: >-
            The Indian Permanent Account Number (PAN) is a unique, 10-character
            alphanumeric identifier issued by the Income Tax Department
        customer_payment_name:
          type: string
          description: >-
            Full name of the owner of this account

            Used when the full name is provided in the response during account
            verification.
      title: Represents India Bank Account PM details
    coinbase.payments.common.payment_methods.Interac:
      type: object
      properties:
        account:
          allOf:
            - $ref: >-
                #/components/schemas/coinbase.payments.common.payment_methods.Interac.Account
        pmsvc_id:
          type: string
        withdrawal_only:
          type: boolean
        coinbase_email:
          type: string
    coinbase.payments.common.payment_methods.Interac.Account:
      type: object
      properties:
        account_name:
          type: string
          title: Name of the account fulfilling the Request Money Transaction
        institution_number:
          type: string
          description: >-
            Institution Number: a 3-digit code that tells you which bank the
            account belongs to — unique for every Canadian bank.
        transit_number:
          type: string
          description: >-
            Transit Number: a 5-digit code that tells which branch of the bank
            the account was created at — it is unique to each bank branch.
        account_number:
          type: string
          description: >-
            Account Number: a 7-digit code that identifies the account within
            the branch and bank entered.
    coinbase.payments.common.payment_methods.IntraBank:
      type: object
      properties:
        currency:
          type: string
        account_number:
          type: string
        routing_number:
          type: string
        customer_name:
          type: string
        fiat_id:
          type: string
    coinbase.payments.common.payment_methods.JpmorganKinexysDetails:
      type: object
      properties:
        account_number:
          type: string
          description: >-
            The account number of the customer's Blockchain Deposit Account
            (BDA) for Kinexys transfers.
        bic:
          type: string
          description: The JPMorgan BIC for the branch servicing the user's BDA account.
      description: >-
        The details of the customer's Blockchain Deposit Account (BDA) enabled
        for Kinexys transfers.
    coinbase.payments.common.payment_methods.LedgerAccount:
      type: object
      properties:
        account_id:
          type: string
        currency:
          type: string
        owner:
          allOf:
            - $ref: >-
                #/components/schemas/coinbase.payments.common.payment_methods.Owner
        account_uuid:
          type: string
        account_name:
          type: string
      title: uniquely identifies an account in the Ledger Service
    coinbase.payments.common.payment_methods.LedgerNamedAccount:
      type: object
      properties:
        name:
          type: string
        currency:
          type: string
        foreign_network:
          type: string
      title: uniquely identifies a named account in the Ledger Service
    coinbase.payments.common.payment_methods.LiquidityPool:
      type: object
      properties:
        network:
          type: string
        pool:
          type: string
        currency:
          type: string
        account_id:
          type: string
        from_address:
          type: string
      title: For the purpose of Liquidity Management
    coinbase.payments.common.payment_methods.MagicSpendBlockchainAddress:
      type: object
      properties:
        address:
          type: string
        destination_tag:
          type: string
      title: >-
        MagicSpendBlockchainAddress is specific object of type
        blockchain_address

        which is used to uniquely identifies if a user is using magic spend
        feature

        to send funds to a smart contract wallet
    coinbase.payments.common.payment_methods.MagicWallet:
      type: object
      properties:
        user_uuid:
          type: string
        network_name:
          type: string
          description: >-
            Specifies the blockchain and network. Similar to `chain_id` but more
            extensible (e.g. it can be `solana-mainnet` or `base-mainnet`).
        wallet_name:
          type: string
          title: >-
            The wallet name is mapped to a wallet address for a user and
            network. Stored in FAS right now. This should match

            names defined in
            https://buf.cbhq.net/retail/dex/docs/main:coinbase.magic_wallet.common#coinbase.magic_wallet.common.MagicWalletName
    coinbase.payments.common.payment_methods.Manual:
      type: object
      properties:
        settlement_bank_name:
          type: string
        settlement_account_number:
          type: string
        reference:
          type: string
      title: >-
        ManualDeposit as a payment method source or target for manual fiat
        deposits
    coinbase.payments.common.payment_methods.MatchResult:
      type: string
      enum:
        - MATCH_RESULT_UNSPECIFIED
        - MATCH_RESULT_MATCH
        - MATCH_RESULT_NO_MATCH
        - MATCH_RESULT_PARTIAL_MATCH
      default: MATCH_RESULT_UNSPECIFIED
      description: |-
        MatchResult represents the result of matching a single component
        against external data (e.g. name on file at the issuer via Visa ANI).
    coinbase.payments.common.payment_methods.MbWayDetails:
      type: object
      properties:
        account_holder:
          type: string
          description: Account holder name linked to this MB Way account.
        country:
          type: string
          description: The country where the payer's bank account is located.
        phone_number:
          type: string
          description: |-
            Phone number linked to this MB Way account.
            Country code followed by hash symbol (#) followed by rest of number.
      title: >-
        MB Way payment method details.

        https://developerhub.ppro.com/simple-api/docs/mb-way#specific-input-parameters-for-the-transaction-call
    coinbase.payments.common.payment_methods.Merchant:
      type: object
      properties:
        mid:
          type: string
    coinbase.payments.common.payment_methods.NameMatchIndicator:
      type: string
      enum:
        - NAME_MATCH_INDICATOR_UNSPECIFIED
        - NAME_MATCH_INDICATOR_PERFORMED
        - NAME_MATCH_INDICATOR_NOT_SUPPORTED
        - NAME_MATCH_INDICATOR_NOT_PERFORMED
      default: NAME_MATCH_INDICATOR_UNSPECIFIED
      description: >-
        NameMatchIndicator represents whether the ANI lookup was performed by
        the issuer.
    coinbase.payments.common.payment_methods.NovaAccount:
      type: object
      properties:
        network:
          type: string
        nova_account_id:
          type: string
        pool_name:
          type: string
        account_idempotency_key:
          type: string
    coinbase.payments.common.payment_methods.OpenBankingDetails:
      type: object
      properties:
        true_layer_bank_provider_id:
          type: string
          description: An ID used by TrueLayer to identify the bank.
        open_banking_provider_id:
          type: string
          title: >-
            A universal ID used to identify the Open Banking bank, see
            go/universal-ob-provider-id for details
      title: 'AIDoc: Represents Open Banking details for bank identification'
    coinbase.payments.common.payment_methods.Owner:
      type: object
      properties:
        id:
          type: string
        uuid:
          type: string
        user_uuid:
          type: string
        type:
          allOf:
            - $ref: >-
                #/components/schemas/coinbase.payments.common.payment_methods.Owner.Type
    coinbase.payments.common.payment_methods.Owner.Type:
      type: string
      enum:
        - UNKNOWN
        - INVESTMENT_VEHICLE
        - RETAIL
        - VENUE
        - PORTFOLIO
      default: UNKNOWN
    coinbase.payments.common.payment_methods.Params3DS:
      type: object
      properties:
        ddc_3ds_id:
          type: string
        disable_cb_checkout:
          type: boolean
          title: >-
            Deprecated: This field is no longer used and will be removed in a
            future version
        use_3ds:
          type: boolean
        secure3d_limits:
          type: boolean
        secure3d_authed_at:
          type: string
          format: RFC3339 Timestamp
      title: 3DS
    coinbase.payments.common.payment_methods.PaymentMethod:
      type: object
      properties:
        type:
          allOf:
            - $ref: >-
                #/components/schemas/coinbase.payments.common.payment_methods.PaymentMethod.Type
        network:
          type: string
        payment_method_id:
          type: string
        payment_method_type_string:
          type: string
        blockchain_address:
          allOf:
            - $ref: >-
                #/components/schemas/coinbase.payments.common.payment_methods.BlockchainAddress
        coinbase_account:
          allOf:
            - $ref: >-
                #/components/schemas/coinbase.payments.common.payment_methods.CoinbaseAccount
        blockchain_transaction:
          allOf:
            - $ref: >-
                #/components/schemas/coinbase.payments.common.payment_methods.BlockchainTransaction
        fedwire:
          allOf:
            - $ref: >-
                #/components/schemas/coinbase.payments.common.payment_methods.Fedwire
        swift:
          allOf:
            - $ref: >-
                #/components/schemas/coinbase.payments.common.payment_methods.Swift
        card:
          allOf:
            - $ref: >-
                #/components/schemas/coinbase.payments.common.payment_methods.Card
        zengin:
          allOf:
            - $ref: >-
                #/components/schemas/coinbase.payments.common.payment_methods.Zengin
        uk:
          allOf:
            - $ref: '#/components/schemas/coinbase.payments.common.payment_methods.Uk'
        sepa:
          allOf:
            - $ref: >-
                #/components/schemas/coinbase.payments.common.payment_methods.Sepa
        paypal:
          allOf:
            - $ref: >-
                #/components/schemas/coinbase.payments.common.payment_methods.Paypal
        ledger_account:
          allOf:
            - $ref: >-
                #/components/schemas/coinbase.payments.common.payment_methods.LedgerAccount
        external_payment_method:
          allOf:
            - $ref: >-
                #/components/schemas/coinbase.payments.common.payment_methods.ExternalPaymentMethod
        pro_account:
          allOf:
            - $ref: >-
                #/components/schemas/coinbase.payments.common.payment_methods.ProAccount
        rtp:
          allOf:
            - $ref: >-
                #/components/schemas/coinbase.payments.common.payment_methods.Rtp
        venue:
          allOf:
            - $ref: >-
                #/components/schemas/coinbase.payments.common.payment_methods.Venue
        ledger_named_account:
          allOf:
            - $ref: >-
                #/components/schemas/coinbase.payments.common.payment_methods.LedgerNamedAccount
        custodial_pool:
          allOf:
            - $ref: >-
                #/components/schemas/coinbase.payments.common.payment_methods.CustodialPool
        apple_pay:
          allOf:
            - $ref: >-
                #/components/schemas/coinbase.payments.common.payment_methods.ApplePay
        default_account:
          allOf:
            - $ref: >-
                #/components/schemas/coinbase.payments.common.payment_methods.DefaultAccount
        remitly:
          allOf:
            - $ref: >-
                #/components/schemas/coinbase.payments.common.payment_methods.Remitly
        pro_internal_account:
          allOf:
            - $ref: >-
                #/components/schemas/coinbase.payments.common.payment_methods.ProInternalAccount
        dapp_wallet_account:
          allOf:
            - $ref: >-
                #/components/schemas/coinbase.payments.common.payment_methods.DAppWalletAccount
        google_pay:
          allOf:
            - $ref: >-
                #/components/schemas/coinbase.payments.common.payment_methods.GooglePay
        dapp_wallet_blockchain_address:
          allOf:
            - $ref: >-
                #/components/schemas/coinbase.payments.common.payment_methods.DAppWalletBlockchainAddress
        zaakpay_mobikwik:
          allOf:
            - $ref: >-
                #/components/schemas/coinbase.payments.common.payment_methods.ZaakpayMobikwik
        deneb_upi:
          allOf:
            - $ref: >-
                #/components/schemas/coinbase.payments.common.payment_methods.DenebUPI
        bank_account:
          allOf:
            - $ref: >-
                #/components/schemas/coinbase.payments.common.payment_methods.BankAccount
        identity_contract_call:
          allOf:
            - $ref: >-
                #/components/schemas/coinbase.payments.common.payment_methods.IdentityContractCall
        deneb_imps:
          allOf:
            - $ref: >-
                #/components/schemas/coinbase.payments.common.payment_methods.DenebIMPS
        allocation:
          allOf:
            - $ref: >-
                #/components/schemas/coinbase.payments.common.payment_methods.Allocation
        liquidity_pool:
          allOf:
            - $ref: >-
                #/components/schemas/coinbase.payments.common.payment_methods.LiquidityPool
        zengin_v2:
          allOf:
            - $ref: >-
                #/components/schemas/coinbase.payments.common.payment_methods.ZenginV2
        direct_deposit:
          allOf:
            - $ref: >-
                #/components/schemas/coinbase.payments.common.payment_methods.DirectDeposit
        sepa_v2:
          allOf:
            - $ref: >-
                #/components/schemas/coinbase.payments.common.payment_methods.SepaV2
        zepto:
          allOf:
            - $ref: >-
                #/components/schemas/coinbase.payments.common.payment_methods.Zepto
        pix_ebanx:
          allOf:
            - $ref: >-
                #/components/schemas/coinbase.payments.common.payment_methods.PixEbanx
        signet:
          allOf:
            - $ref: >-
                #/components/schemas/coinbase.payments.common.payment_methods.Signet
        derivative_settlement:
          allOf:
            - $ref: >-
                #/components/schemas/coinbase.payments.common.payment_methods.DerivativeSettlement
        user:
          allOf:
            - $ref: >-
                #/components/schemas/coinbase.payments.common.payment_methods.User
        sg_fast:
          allOf:
            - $ref: >-
                #/components/schemas/coinbase.payments.common.payment_methods.SgFast
        interac:
          allOf:
            - $ref: >-
                #/components/schemas/coinbase.payments.common.payment_methods.Interac
        intra_bank:
          allOf:
            - $ref: >-
                #/components/schemas/coinbase.payments.common.payment_methods.IntraBank
        cbit:
          allOf:
            - $ref: >-
                #/components/schemas/coinbase.payments.common.payment_methods.Cbit
        ideal:
          allOf:
            - $ref: >-
                #/components/schemas/coinbase.payments.common.payment_methods.Ideal
        sofort:
          allOf:
            - $ref: >-
                #/components/schemas/coinbase.payments.common.payment_methods.Sofort
        sg_paynow:
          allOf:
            - $ref: >-
                #/components/schemas/coinbase.payments.common.payment_methods.SgPayNow
        checkout_payment_link:
          allOf:
            - $ref: >-
                #/components/schemas/coinbase.payments.common.payment_methods.CheckoutPaymentLink
        email_address:
          allOf:
            - $ref: >-
                #/components/schemas/coinbase.payments.common.payment_methods.EmailAddress
        phone_number:
          allOf:
            - $ref: >-
                #/components/schemas/coinbase.payments.common.payment_methods.PhoneNumber
        vendor_payment:
          allOf:
            - $ref: >-
                #/components/schemas/coinbase.payments.common.payment_methods.VendorPayment
        ctn:
          allOf:
            - $ref: >-
                #/components/schemas/coinbase.payments.common.payment_methods.CTN
        bancomat_pay:
          allOf:
            - $ref: >-
                #/components/schemas/coinbase.payments.common.payment_methods.BancomatPay
        hot_wallet:
          allOf:
            - $ref: >-
                #/components/schemas/coinbase.payments.common.payment_methods.HotWallet
        nova_account:
          allOf:
            - $ref: >-
                #/components/schemas/coinbase.payments.common.payment_methods.NovaAccount
        magic_spend_blockchain_address:
          allOf:
            - $ref: >-
                #/components/schemas/coinbase.payments.common.payment_methods.MagicSpendBlockchainAddress
        transfer_pointer:
          allOf:
            - $ref: >-
                #/components/schemas/coinbase.payments.common.payment_methods.TransferPointer
        eft:
          allOf:
            - $ref: >-
                #/components/schemas/coinbase.payments.common.payment_methods.Eft
        wallace_account:
          allOf:
            - $ref: >-
                #/components/schemas/coinbase.payments.common.payment_methods.WallaceAccount
        manual:
          allOf:
            - $ref: >-
                #/components/schemas/coinbase.payments.common.payment_methods.Manual
        argentine_bank_account:
          allOf:
            - $ref: >-
                #/components/schemas/coinbase.payments.common.payment_methods.ArgentineBankAccountDetails
        representment:
          allOf:
            - $ref: >-
                #/components/schemas/coinbase.payments.common.payment_methods.Representment
        banking_circle_now:
          allOf:
            - $ref: >-
                #/components/schemas/coinbase.payments.common.payment_methods.BankingCircleNowDetails
        trustly:
          allOf:
            - $ref: >-
                #/components/schemas/coinbase.payments.common.payment_methods.TrustlyDetails
        blik:
          allOf:
            - $ref: >-
                #/components/schemas/coinbase.payments.common.payment_methods.BlikDetails
        mb_way:
          allOf:
            - $ref: >-
                #/components/schemas/coinbase.payments.common.payment_methods.MbWayDetails
        pix:
          allOf:
            - $ref: >-
                #/components/schemas/coinbase.payments.common.payment_methods.PixDetails
        magic_wallet:
          allOf:
            - $ref: >-
                #/components/schemas/coinbase.payments.common.payment_methods.MagicWallet
        samsung_pay:
          allOf:
            - $ref: >-
                #/components/schemas/coinbase.payments.common.payment_methods.SamsungPay
        cad_wire:
          allOf:
            - $ref: >-
                #/components/schemas/coinbase.payments.common.payment_methods.CadWireDetails
        wab_intra_bank:
          allOf:
            - $ref: >-
                #/components/schemas/coinbase.payments.common.payment_methods.WabIntraBankDetails
        india_bank_account:
          allOf:
            - $ref: >-
                #/components/schemas/coinbase.payments.common.payment_methods.IndiaBankAccountDetails
        jpmorgan_kinexys:
          allOf:
            - $ref: >-
                #/components/schemas/coinbase.payments.common.payment_methods.JpmorganKinexysDetails
        sic:
          allOf:
            - $ref: >-
                #/components/schemas/coinbase.payments.common.payment_methods.SicDetails
        spei:
          allOf:
            - $ref: >-
                #/components/schemas/coinbase.payments.common.payment_methods.SpeiDetails
      title: |-
        PaymentMethod is a wrapper describing a specific type of payment method.
         this is probably the only type you need to modify (and possibly VerificationRequest/Response)
    coinbase.payments.common.payment_methods.PaymentMethod.Type:
      type: string
      enum:
        - INVALID
        - UNSET
        - BLOCKCHAIN_ADDRESS
        - COINBASE_ACCOUNT
        - BLOCKCHAIN_TRANSACTION
        - FEDWIRE
        - SWIFT
        - CARD
        - ZENGIN
        - UK
        - SEPA
        - PAYPAL
        - LEDGER_ACCOUNT
        - EXTERNAL_PAYMENT_METHOD
        - PRO_ACCOUNT
        - RTP
        - CARD_REPRESENTMENT
        - VENUE
        - LEDGER_NAMED_ACCOUNT
        - CUSTODIAL_POOL
        - APPLE_PAY
        - DEFAULT_ACCOUNT
        - REMITLY
        - PRO_INTERNAL_ACCOUNT
        - DAPP_WALLET_ACCOUNT
        - GOOGLE_PAY
        - DAPP_WALLET_BLOCKCHAIN_ADDRESS
        - ZAAKPAY_MOBIKWIK
        - DENEB_UPI
        - BANK_ACCOUNT
        - IDENTITY_CONTRACT_CALL
        - DENEB_IMPS
        - ALLOCATION
        - LIQUIDITY_POOL
        - ZENGIN_V2
        - DIRECT_DEPOSIT
        - SEPA_V2
        - ZEPTO
        - PIX_EBANX
        - SIGNET
        - DERIVATIVE_SETTLEMENT
        - USER
        - SG_FAST
        - INTERAC
        - INTRA_BANK
        - CBIT
        - IDEAL
        - SOFORT
        - SG_PAYNOW
        - CHECKOUT_PAYMENT_LINK
        - EMAIL_ADDRESS
        - PHONE_NUMBER
        - VENDOR_PAYMENT
        - CTN
        - BANCOMAT_PAY
        - HOT_WALLET
        - NOVA_ACCOUNT
        - MAGIC_SPEND_BLOCKCHAIN_ADDRESS
        - TRANSFER_POINTER
        - EFT
        - WALLACE_ACCOUNT
        - MANUAL
        - ARGENTINE_BANK_ACCOUNT
        - REPRESENTMENT
        - BANKING_CIRCLE_NOW
        - TRUSTLY
        - BLIK
        - MB_WAY
        - PIX
        - MAGIC_WALLET
        - SAMSUNG_PAY
        - CAD_WIRE
        - WAB_INTRA_BANK
        - INDIA_BANK_ACCOUNT
        - OPEN_BANKING
        - SPEI
        - JPMORGAN_KINEXYS
        - SIC
        - PIX_DEPOSIT
        - PIX_WITHDRAWAL
        - FAKE_ACH
      default: INVALID
      title: >-
        - CAD_WIRE: Canada Wire payment type
         - WAB_INTRA_BANK: WAB Intra Bank Transfer payment type
         - INDIA_BANK_ACCOUNT: India Bank Account payment type
         - OPEN_BANKING: While OB is a facilitator and not an indepedent payment method, it can be displayed
        to the user as an available payment method. Concrete payment method will
        be UK

        or SEPA_V2 which hold open banking details.
         - SPEI: Mexico SPEI payment type
         - JPMORGAN_KINEXYS: JPMorgan Kinexys is a 24x7 real-time cross-border network for clients of JPMorgan.
         - SIC: CHF SIC payment type for Swiss users
         - PIX_DEPOSIT: Used by PMSvc for legacy PIX deposit while it's being deprecated
         - PIX_WITHDRAWAL: Used by PMSvc for legacy PIX withdrawal while it's being deprecated
         - FAKE_ACH: Test PMs (9001-9999); prefix all pm types with FAKE_
        Fake implementation of an ACH payment method
    coinbase.payments.common.payment_methods.Paypal:
      type: object
      properties:
        account_holder:
          allOf:
            - $ref: >-
                #/components/schemas/coinbase.payments.common.payment_methods.PaypalAccount
        merchant:
          allOf:
            - $ref: >-
                #/components/schemas/coinbase.payments.common.payment_methods.PaypalMerchant
        metadata:
          allOf:
            - $ref: >-
                #/components/schemas/coinbase.payments.common.payment_methods.PaypalMetadata
        email:
          type: string
        owner_name:
          type: string
        birth_date:
          type: string
        phone_number:
          type: string
        phone_type:
          type: string
        billing_address:
          allOf:
            - $ref: '#/components/schemas/coinbase.payments.common.Address'
        braintree_customer_id:
          type: string
        payment_method_nonce:
          type: string
        payer_id:
          type: string
    coinbase.payments.common.payment_methods.PaypalAccount:
      type: object
      properties:
        paypal_id:
          type: string
        paypal_pm_id:
          type: string
        paypal_verified:
          type: boolean
        account_type:
          type: string
        account_age:
          type: string
      title: Represents a customer's paypal account
    coinbase.payments.common.payment_methods.PaypalMerchant:
      type: object
      properties:
        merchant_account_id:
          type: string
      title: |-
        Represents coinbase's merchant account
        For payouts, this is the source of funds
    coinbase.payments.common.payment_methods.PaypalMetadata:
      type: object
      properties:
        paypal_correlation_id:
          type: string
        authorization_code:
          type: string
    coinbase.payments.common.payment_methods.PhoneNumber:
      type: object
      properties:
        value:
          type: string
    coinbase.payments.common.payment_methods.PixAccountType:
      type: string
      enum:
        - ACCOUNT_TYPE_UNSPECIFIED
        - ACCOUNT_TYPE_CHECKING
        - ACCOUNT_TYPE_SALARY
        - ACCOUNT_TYPE_SAVINGS
        - ACCOUNT_TYPE_TRANSACTION
      default: ACCOUNT_TYPE_UNSPECIFIED
      description: |2-
         - ACCOUNT_TYPE_CHECKING: Checking account.
         - ACCOUNT_TYPE_SALARY: Salary account.
         - ACCOUNT_TYPE_SAVINGS: Savings account.
         - ACCOUNT_TYPE_TRANSACTION: Transaction account.
    coinbase.payments.common.payment_methods.PixDetails:
      type: object
      properties:
        account_number:
          type: string
          title: The account number for the PIX transaction
        account_type:
          type: string
          title: The type of account (e.g., checking, savings)
        bank_code:
          type: string
          title: The code of the bank involved in the transaction
        bank_name:
          type: string
          title: The name of the bank
        branch_number:
          type: string
          title: >-
            The branch number of the bank, do not use this field, use
            branch_code instead
        customer_payment_name:
          type: string
          title: The name of the customer making the payment
        sender_document:
          type: string
          title: >-
            The sender document for the transaction. It is really the tax_id of
            the sender: CPF for individual) or CNPJ for business in Brazil
        pix_key:
          type: string
          description: >-
            The PIX key for the transaction. Only used for withdraw. For
            deposit, it is not used.
        pix_account_type:
          description: The type of account.
          allOf:
            - $ref: >-
                #/components/schemas/coinbase.payments.common.payment_methods.PixAccountType
        branch_code:
          type: string
          title: The branch code of the bank
      title: Represents details for a PIX transaction
    coinbase.payments.common.payment_methods.PixEbanx:
      type: object
      properties:
        payment_method_id:
          type: string
        user_uuid:
          type: string
        deposit:
          allOf:
            - $ref: >-
                #/components/schemas/coinbase.payments.common.payment_methods.PixEbanx.PixDeposit
        withdrawal:
          allOf:
            - $ref: >-
                #/components/schemas/coinbase.payments.common.payment_methods.PixEbanx.PixWithdrawal
    coinbase.payments.common.payment_methods.PixEbanx.PixDeposit:
      type: object
      properties:
        transaction_id:
          type: string
        account_id:
          type: string
        account_number:
          type: string
        account_type:
          type: string
        bank_code:
          type: string
        bank_name:
          type: string
        branch_number:
          type: string
        customer_payment_name:
          type: string
        sender_document:
          type: string
    coinbase.payments.common.payment_methods.PixEbanx.PixWithdrawal:
      type: object
      properties:
        account_number:
          type: string
        account_type:
          type: string
        bank_code:
          type: string
        branch_number:
          type: string
        pix_key:
          type: string
        customer_payment_name:
          type: string
        sender_document:
          type: string
        bank_name:
          type: string
    coinbase.payments.common.payment_methods.PlaidInfo:
      type: object
      properties:
        plaid_bank_name:
          type: string
        plaid_access_token:
          type: string
        plaid_item_id:
          type: string
        plaid_old_access_token:
          type: string
        plaid_response:
          type: string
        plaid_info:
          type: string
        plaid_account_id:
          type: string
        plaid_test_account:
          type: boolean
        plaid_link_account:
          type: boolean
        plaid_link_bank_name:
          type: string
        balance:
          allOf:
            - $ref: '#/components/schemas/coinbase.payments.shared.Money'
        balance_updated_at:
          type: string
          format: RFC3339 Timestamp
        plaid_name_check:
          type: boolean
        plaid_public_token:
          type: string
        account_number_mask:
          type: string
        plaid_persistent_account_id:
          type: string
          title: >-
            plaid_persistent_account_id is a stable identifier that persists
            across re-links for TAN banks.

            Only available for TAN banks (Chase, PNC, US Bank).

            See:
            https://plaid.com/docs/api/accounts/#accounts-get-response-accounts-persistent-account-id
        is_tokenized_account_number:
          type: boolean
          title: >-
            is_tokenized_account_number indicates if the account uses tokenized
            account numbers (TAN).

            When true, use plaid_persistent_account_id for matching; when false,
            use plaid_account_id.

            See:
            https://plaid.com/docs/api/products/auth/#auth-get-response-numbers-ach-is-tokenized-account-number
        is_plaid_supported:
          type: boolean
          description: >-
            is_plaid_supported indicates whether the bank account's routing
            number supports Plaid.

            Computed from routing number lookup at request time and used for
            risk evaluation.
    coinbase.payments.common.payment_methods.ProAccount:
      type: object
      properties:
        account_id:
          type: string
        coinbase_account_id:
          type: string
        user_id:
          type: string
        currency:
          type: string
        portfolio_id:
          type: string
      title: uniquely identifies an account on Pro
    coinbase.payments.common.payment_methods.ProInternalAccount:
      type: object
      properties:
        user_id:
          type: string
        currency:
          type: string
      title: uniquely identifies an internal account on Pro
    coinbase.payments.common.payment_methods.Remitly:
      type: object
      properties:
        account_holder:
          allOf:
            - $ref: >-
                #/components/schemas/coinbase.payments.common.payment_methods.RemitlyAccount
    coinbase.payments.common.payment_methods.RemitlyAccount:
      type: object
      properties:
        recipient_id:
          type: string
        payout_method_type:
          type: string
        recipient_version:
          type: string
        currency:
          type: string
      title: Represents a customer in remitly
    coinbase.payments.common.payment_methods.Representment:
      type: object
      properties:
        currency:
          type: string
      title: Representment debit won to overturn a card chargeback
    coinbase.payments.common.payment_methods.Rtp:
      type: object
      properties:
        account_holder:
          allOf:
            - $ref: >-
                #/components/schemas/coinbase.payments.common.payment_methods.RtpAccount
        institution:
          allOf:
            - $ref: >-
                #/components/schemas/coinbase.payments.common.payment_methods.RtpInstitution
        currency:
          type: string
      description: >-
        For withdrawals: contains all info to initiate payment to eligible bank
        account.

        For deposits: contains info to initiate payment to a Coinbase Fiat
        account.
    coinbase.payments.common.payment_methods.RtpAccount:
      type: object
      properties:
        legal_name:
          type: string
        identifier:
          type: string
        bank_account_id:
          type: string
      title: >-
        RtpAccount represents an account at a financial institution eligible for
        RTP network payments
    coinbase.payments.common.payment_methods.RtpInstitution:
      type: object
      properties:
        routing_number:
          type: string
      title: >-
        RtpInstitution is financial institution eligible for RTP network
        payments
    coinbase.payments.common.payment_methods.SamsungPay:
      type: object
      properties:
        samsung_pay:
          allOf:
            - $ref: >-
                #/components/schemas/coinbase.payments.common.DigitalWalletDetails
        user_id:
          type: string
          title: uniquely identifies a user's Coinbase account
        postal_code:
          type: string
          title: >-
            The following fields can be populated on the PM after an order

            is submitted in the InstructionResponse. They should not be filled
            in

            A normal order Instruction though

            Billing postal code for the card
        customer_name:
          type: string
        address:
          title: Billing address for the card
          allOf:
            - $ref: >-
                #/components/schemas/coinbase.payments.common.payment_methods.Address
        six_digit_bin:
          type: string
        last_four:
          type: string
        issuing_country:
          type: string
        issuing_bank:
          type: string
        product_id:
          type: string
        customer_dob:
          type: string
          title: Date of birth in YYYY-MM-DD format
        currency:
          type: string
          title: Currency of the transaction
        billing_address_id:
          type: string
          title: Users address id
        scheme:
          allOf:
            - $ref: >-
                #/components/schemas/coinbase.payments.common.payment_methods.SamsungPay.Scheme
        prepaid:
          allOf:
            - $ref: >-
                #/components/schemas/coinbase.payments.common.payment_methods.SamsungPay.Result
        debit:
          allOf:
            - $ref: >-
                #/components/schemas/coinbase.payments.common.payment_methods.SamsungPay.Result
    coinbase.payments.common.payment_methods.SamsungPay.Result:
      type: string
      enum:
        - UNCERTAIN
        - 'TRUE'
        - 'FALSE'
      default: UNCERTAIN
      title: Flag to mark card as prepaid or debit
    coinbase.payments.common.payment_methods.SamsungPay.Scheme:
      type: string
      enum:
        - UNKNOWN
        - VISA
        - MASTERCARD
      default: UNKNOWN
      title: Field to store scheme of the card
    coinbase.payments.common.payment_methods.Sepa:
      type: object
      properties:
        account_holder:
          allOf:
            - $ref: >-
                #/components/schemas/coinbase.payments.common.payment_methods.SepaAccount
        institution:
          allOf:
            - $ref: >-
                #/components/schemas/coinbase.payments.common.payment_methods.SepaInstitution
        customer_first_name:
          type: string
        customer_last_name:
          type: string
        email:
          type: string
        phone_number:
          type: string
    coinbase.payments.common.payment_methods.SepaAccount:
      type: object
      properties:
        legal_name:
          type: string
        iban:
          type: string
        bban:
          type: string
    coinbase.payments.common.payment_methods.SepaAccountDetail:
      type: object
      properties:
        legal_name:
          type: string
          description: Required. Legal name of the account holder.
        iban:
          type: string
          description: Required. The IBAN number identifies the account.
        bban:
          type: string
          title: 'AIDoc: The Basic Bank Account Number'
        account_address:
          type: string
          title: 'AIDoc: The address associated with the account'
      description: The detailed SEPA account information.
    coinbase.payments.common.payment_methods.SepaInstitution:
      type: object
      properties:
        bic:
          type: string
          title: >-
            AIDoc: The Bank Identifier Code

            Required field that conforms to the 8-11 character ISO 9362 SWIFT
            format. Used to identify

            the bank for international processing:

            Ex: "BOFAUS3N"
        name:
          type: string
          title: 'AIDoc: The name of the financial institution'
        bank_country_code:
          type: string
          title: 'AIDoc: The country code for the bank'
        bank_country_name:
          type: string
          title: 'AIDoc: The country name for the bank'
        bank_address:
          type: string
          title: 'AIDoc: The address of the bank'
      title: 'AIDoc: Represents a SEPA financial institution'
    coinbase.payments.common.payment_methods.SepaV2:
      type: object
      properties:
        account:
          description: The SEPA account details.
          allOf:
            - $ref: >-
                #/components/schemas/coinbase.payments.common.payment_methods.SepaAccountDetail
        customer_first_name:
          type: string
          title: 'AIDoc: The customer''s first name'
        customer_last_name:
          type: string
          title: 'AIDoc: The customer''s last name'
        email:
          type: string
          title: 'AIDoc: The customer''s email address'
        phone_number:
          type: string
          title: 'AIDoc: The customer''s phone number'
        customer_country:
          type: string
          description: Customer's country in ISO-3166-1 ALPHA-2.
        address:
          description: 'Deprecated. Address was required for Banking Circle '
          allOf:
            - $ref: '#/components/schemas/coinbase.payments.common.Address'
        supports_open_banking:
          type: boolean
          description: Meant to be used for routing in PGS.
        banking_circle_token:
          description: Used for SEPA Direct Debit payments.
          allOf:
            - $ref: >-
                #/components/schemas/coinbase.payments.common.payment_methods.BankingCircleToken
        institution:
          title: 'AIDoc: The financial institution details'
          allOf:
            - $ref: >-
                #/components/schemas/coinbase.payments.common.payment_methods.SepaInstitution
        currency:
          type: string
          title: 'AIDoc: The currency code for the payment method'
        fiat_id:
          type: string
          title: >-
            ONLY used by prime admin - Venue Entity Type reference code
            onboarding
        direct_debit_ineligible:
          type: boolean
          description: >-
            If the user's bank account does not support this flow,
            direct_debit_ineligible will be marked explicitly as true.

            So that users will be refrained from attempting with this payment
            method again.
        open_banking_details:
          title: 'AIDoc: Open Banking details for bank identification'
          allOf:
            - $ref: >-
                #/components/schemas/coinbase.payments.common.payment_methods.OpenBankingDetails
      description: SepaV2 identifies for the payment method SEPA_V2
    coinbase.payments.common.payment_methods.SgFast:
      type: object
      properties:
        account:
          title: 'AIDoc: The account details for the FAST transfer'
          allOf:
            - $ref: >-
                #/components/schemas/coinbase.payments.common.payment_methods.SgFastAccount
        institution:
          title: 'AIDoc: The financial institution details'
          allOf:
            - $ref: >-
                #/components/schemas/coinbase.payments.common.payment_methods.SgFastInstitution
        direct_debit_auth_state:
          title: 'AIDoc: The current state of direct debit authorisation'
          allOf:
            - $ref: >-
                #/components/schemas/coinbase.payments.common.payment_methods.SgFastDirectDebitAuthorisationState
        direct_debit_token:
          type: string
          title: 'AIDoc: Token for direct debit authorisation'
      title: SgFast identifies the FAST Bank Transfer payment method in Singapore
    coinbase.payments.common.payment_methods.SgFastAccount:
      type: object
      properties:
        customer_name:
          type: string
          title: 'AIDoc: The name of the customer'
        account_number:
          type: string
          title: 'AIDoc: The account number (e.g. 1201231231)'
      title: 'AIDoc: Represents a Singapore FAST bank account'
    coinbase.payments.common.payment_methods.SgFastDirectDebitAuthorisationState:
      type: string
      enum:
        - STATE_UNSPECIFIED
        - STATE_PENDING
        - STATE_AUTHORIZED
        - STATE_REJECTED
        - STATE_EXPIRED
      default: STATE_UNSPECIFIED
      description: |-
        - STATE_UNSPECIFIED: AIDoc: Default state when SG FAST PM is created
         - STATE_PENDING: AIDoc: Authorisation is pending approval
         - STATE_AUTHORIZED: AIDoc: Authorisation has been approved
         - STATE_REJECTED: AIDoc: Authorisation has been rejected
         - STATE_EXPIRED: AIDoc: Authorisation has expired
      title: 'AIDoc: Represents the possible states of direct debit authorisation'
    coinbase.payments.common.payment_methods.SgFastInstitution:
      type: object
      properties:
        bank_code:
          type: string
          title: 'AIDoc: The SWIFT Code of the bank (e.g. DBSSGSG)'
      title: 'AIDoc: Represents a Singapore FAST financial institution'
    coinbase.payments.common.payment_methods.SgPayNow:
      type: object
      properties:
        identifier_type:
          allOf:
            - $ref: >-
                #/components/schemas/coinbase.payments.common.payment_methods.SgPayNow.IdentifierType
        identifier:
          type: string
        customer_name:
          type: string
      description: SgPayNow identifies the PayNow Transfer payment method in Singapore.
    coinbase.payments.common.payment_methods.SgPayNow.IdentifierType:
      type: string
      enum:
        - TYPE_UNSPECIFIED
        - TYPE_NRIC
        - TYPE_PHONE
      default: TYPE_UNSPECIFIED
    coinbase.payments.common.payment_methods.SicDetails:
      type: object
      properties:
        legal_name:
          type: string
          title: >-
            The legal name of the account holder (same as customer_payment_name
            in PMSvc definition)
        iban:
          type: string
          title: The International Bank Account Number
        swift:
          type: string
          title: Bank Identification SWIFT
        customer_payment_address1:
          type: string
          title: The first line of the customer payment address
        customer_payment_address2:
          type: string
          title: The second line of the customer payment address
        customer_payment_address3:
          type: string
          title: The third line of the customer payment address
        bank_name:
          type: string
          title: The name of the bank
        bank_address1:
          type: string
          title: The first line of the bank address
        bank_address2:
          type: string
          title: The second line of the bank address
        bank_address3:
          type: string
          title: The third line of the bank address
        bank_country_code:
          type: string
          title: The country code for the bank
    coinbase.payments.common.payment_methods.Signet:
      type: object
      properties:
        signet_wallet_id:
          type: string
    coinbase.payments.common.payment_methods.Sofort:
      type: object
      properties:
        currency:
          type: string
        iban:
          type: string
        bic:
          type: string
        bank_name:
          type: string
        customer_payment_name:
          type: string
        customer_country_code:
          type: string
      title: ''
    coinbase.payments.common.payment_methods.SpeiDetails:
      type: object
      properties:
        account_number:
          type: string
          title: The account number (CLABE)
        customer_name:
          type: string
          title: The name of the account holder
      description: >-
        *

        Contains all information necessary to process SPEI transactions
        including account number (CLABE) and customer name.

        SPEI is a real-time gross settlement system developed and operated by
        Banco de México, the country's central bank.

        It supports 24/7 electronic fund transfers between all major banks and
        can process transactions within seconds.
    coinbase.payments.common.payment_methods.StripeCardCheckStatus:
      type: string
      enum:
        - STRIPE_CARD_CHECK_STATUS_UNKNOWN
        - STRIPE_CARD_CHECK_STATUS_PASS
        - STRIPE_CARD_CHECK_STATUS_FAIL
        - STRIPE_CARD_CHECK_STATUS_UNAVAILABLE
        - STRIPE_CARD_CHECK_STATUS_UNCHECKED
      default: STRIPE_CARD_CHECK_STATUS_UNKNOWN
      title: >-
        stripe card check status result is one of pass, fail, unavailable, or
        unchecked
    coinbase.payments.common.payment_methods.StripeFinancialConnectionsInfo:
      type: object
      properties:
        stripe_response:
          type: string
          description: The response data returned by Stripe for the financial connection.
        stripe_info:
          type: string
          description: Additional information about the Stripe financial connection.
        stripe_financial_connections_id:
          type: string
          description: The unique identifier for the Stripe financial connection.
        stripe_payment_method_id:
          type: string
          description: The unique identifier for the Stripe payment method.
        stripe_test_account:
          type: boolean
          description: Indicates whether the account is a test account in Stripe.
        stripe_link_account:
          type: boolean
          description: Indicates whether the account is linked through Stripe.
        stripe_link_bank_name:
          type: string
          description: The name of the bank linked through Stripe.
        stripe_institution_id:
          type: string
          description: The unique identifier for the institution linked through Stripe.
        balance:
          description: The balance of the account, represented as a Money object.
          allOf:
            - $ref: '#/components/schemas/coinbase.payments.shared.Money'
        balance_updated_at:
          type: string
          format: RFC3339 Timestamp
          description: The timestamp of the last balance update.
        stripe_name_check:
          type: boolean
          description: Indicates whether the name check passed for the Stripe account.
    coinbase.payments.common.payment_methods.StripeParams:
      type: object
      properties:
        stripe_id:
          type: string
          title: >-
            Stripe payment method ID used to retrive the card and initiate the
            payment

            Example: pm_1QxbXIHUb191ZnmcL8TqLfIM
        radar_session_id:
          type: string
          title: >-
            Stripe Radar provides real-time fraud protection

            radar session ID collected by FE SDK is required for the payment
            method creation call with Stripe

            Ex: "rse_1234567890abcdef"
        address_line1_check:
          allOf:
            - $ref: >-
                #/components/schemas/coinbase.payments.common.payment_methods.StripeCardCheckStatus
        address_postal_code_check:
          allOf:
            - $ref: >-
                #/components/schemas/coinbase.payments.common.payment_methods.StripeCardCheckStatus
        cvc_check:
          allOf:
            - $ref: >-
                #/components/schemas/coinbase.payments.common.payment_methods.StripeCardCheckStatus
      title: Stripe Integration
    coinbase.payments.common.payment_methods.Swift:
      type: object
      properties:
        account_holder:
          title: 'AIDoc: The account holder information'
          allOf:
            - $ref: >-
                #/components/schemas/coinbase.payments.common.payment_methods.SwiftAccount
        institution:
          title: 'AIDoc: The primary financial institution details'
          allOf:
            - $ref: >-
                #/components/schemas/coinbase.payments.common.payment_methods.SwiftInstitution
        intermediary:
          title: >-
            AIDoc: The intermediary bank details (populated if intermediary bank
            is used)
          allOf:
            - $ref: >-
                #/components/schemas/coinbase.payments.common.payment_methods.SwiftInstitution
        currency:
          type: string
          title: 'AIDoc: The currency code for the payment method'
        rejection_count:
          type: integer
          format: int32
          title: 'AIDoc: The number of rejections for this SWIFT payment method'
      title: 'AIDoc: Represents details for a SWIFT payment method'
    coinbase.payments.common.payment_methods.SwiftAccount:
      type: object
      properties:
        legal_name:
          type: string
          title: >-
            AIDoc: The legal name of the account holder (same as
            customer_payment_name in PMSvc definition)
        iban:
          type: string
          title: 'AIDoc: The International Bank Account Number'
        bban:
          type: string
          title: >-
            AIDoc: The Basic Bank Account Number

            This field is populated using the Swift value for Swift payment
            method
        domestic_account_id:
          type: string
          title: 'AIDoc: The domestic account identifier'
        customer_payment_address1:
          type: string
          title: 'AIDoc: The first line of the customer payment address'
        customer_payment_address2:
          type: string
          title: 'AIDoc: The second line of the customer payment address'
        customer_payment_address3:
          type: string
          title: 'AIDoc: The third line of the customer payment address'
        customer_payment_country_code:
          type: string
          title: 'AIDoc: The country code for the customer payment address'
        iban_generated:
          type: boolean
          title: 'AIDoc: Whether the IBAN was generated automatically'
      title: 'AIDoc: Represents a SWIFT bank account'
    coinbase.payments.common.payment_methods.SwiftInstitution:
      type: object
      properties:
        bic:
          type: string
          title: 'AIDoc: The Bank Identifier Code'
        name:
          type: string
          title: 'AIDoc: The name of the financial institution'
        bank_address1:
          type: string
          title: 'AIDoc: The first line of the bank address'
        bank_address2:
          type: string
          title: 'AIDoc: The second line of the bank address'
        bank_address3:
          type: string
          title: 'AIDoc: The third line of the bank address'
        bank_country_code:
          type: string
          title: 'AIDoc: The country code for the bank'
        domestic_bank_id:
          type: string
          title: 'AIDoc: The domestic bank identifier'
        international_bank_id:
          type: string
          title: 'AIDoc: The international bank identifier'
      title: 'AIDoc: Represents a SWIFT financial institution'
    coinbase.payments.common.payment_methods.TransferPointer:
      type: object
      properties:
        idem:
          type: string
    coinbase.payments.common.payment_methods.TrustlyDetails:
      type: object
      properties:
        country:
          type: string
          description: >-
            The country where the payer's bank account is located. Populated for
            all Trustly payments in the PMSvc API response.
        iban:
          type: string
          description: >-
            IBAN of the payer. This field is optional and may not be populated
            for all Trustly payments in the PMSvc API response.
        account_holder:
          type: string
          description: >-
            Account holder names. This field is optional and may not be
            populated for all Trustly payments in the PMSvc API response.
        bank_code:
          type: string
          description: >-
            Bank code of the payer's bank account. This field is optional and
            may not be populated for all Trustly payments in the PMSvc API
            response.
        account_number:
          type: string
          description: >-
            Bank account number belonging to the payer. This field is optional
            and may not be populated for all Trustly payments in the PMSvc API
            response.
        partial_account_number:
          type: string
          description: >-
            Partial Account Number belonging to the payer. Populated for all
            Trustly payments in the PMSvc API response.
        bank_name:
          type: string
          description: >-
            Bank name of the payer. Populated for all Trustly payments in the
            PMSvc API response.
        email:
          type: string
          description: >-
            Consumer Email. Populated for all Trustly payments in the PMSvc API
            response.
      description: >-
        https://developerhub.ppro.com/simple-api/docs/trustly#specific-input-parameters-for-the-transaction-call.
    coinbase.payments.common.payment_methods.Uk:
      type: object
      properties:
        account_holder:
          title: 'AIDoc: The account holder information'
          allOf:
            - $ref: >-
                #/components/schemas/coinbase.payments.common.payment_methods.UkAccount
        institution:
          title: 'AIDoc: The financial institution details'
          allOf:
            - $ref: >-
                #/components/schemas/coinbase.payments.common.payment_methods.UkInstitution
        customer_first_name:
          type: string
          title: 'AIDoc: The customer''s first name'
        customer_last_name:
          type: string
          title: 'AIDoc: The customer''s last name'
        email:
          type: string
          title: 'AIDoc: The customer''s email address'
        phone_number:
          type: string
          title: 'AIDoc: The customer''s phone number'
        currency:
          type: string
          title: 'AIDoc: The currency code for the payment method'
        open_banking_details:
          title: 'AIDoc: Open Banking details for bank identification'
          allOf:
            - $ref: >-
                #/components/schemas/coinbase.payments.common.payment_methods.OpenBankingDetails
      title: 'AIDoc: Represents details for a UK bank transfer'
    coinbase.payments.common.payment_methods.UkAccount:
      type: object
      properties:
        legal_name:
          type: string
          title: 'AIDoc: The legal name of the account holder'
        bban:
          type: string
          title: 'AIDoc: The Basic Bank Account Number'
        sort_code:
          type: string
          title: 'AIDoc: The UK bank sort code'
        account_number:
          type: string
          title: 'AIDoc: The account number'
        address:
          title: 'AIDoc: The address associated with the account'
          allOf:
            - $ref: '#/components/schemas/coinbase.payments.common.Address'
        account_type:
          title: 'AIDoc: The type of UK bank account (savings, etc.)'
          allOf:
            - $ref: >-
                #/components/schemas/coinbase.payments.common.payment_methods.UkAccountType
      title: 'AIDoc: Represents a UK bank account'
    coinbase.payments.common.payment_methods.UkAccountType:
      type: string
      enum:
        - UK_ACCOUNT_TYPE_UNSPECIFIED
        - UK_ACCOUNT_TYPE_SAVINGS
      default: UK_ACCOUNT_TYPE_UNSPECIFIED
      description: >-
        - UK_ACCOUNT_TYPE_UNSPECIFIED: Default value when the UK account type is
        not known
         - UK_ACCOUNT_TYPE_SAVINGS: Represents a UK savings account
      title: Represents the types of UK bank accounts
    coinbase.payments.common.payment_methods.UkInstitution:
      type: object
      properties:
        name:
          type: string
          title: 'AIDoc: The name of the financial institution'
      title: 'AIDoc: Represents a UK financial institution'
    coinbase.payments.common.payment_methods.User:
      type: object
      properties:
        user_uuid:
          type: string
    coinbase.payments.common.payment_methods.VaultToken:
      type: object
      properties:
        value:
          type: string
        vault_id:
          type: string
        attempted_at:
          type: string
          format: RFC3339 Timestamp
        encrypted_data:
          type: string
        encrypted_cvv:
          type: string
    coinbase.payments.common.payment_methods.VendorPayment:
      type: object
      properties:
        vendor_name:
          type: string
        vendor_payment_id:
          type: string
      title: vendor payment is currenly only used by coinbase pay guest checkout
    coinbase.payments.common.payment_methods.VendorVerificationStatus:
      type: object
      properties:
        iav_status:
          type: string
          description: The status of the IAV (Instant Account Verification) process.
        md_status:
          type: string
          description: The status of the MD (Micro Deposit) process.
        email_verification_status:
          type: string
          description: The status of the email verification process.
      description: >-
        VendorVerificationStatus is used to store the verification status of the
        vendor.
    coinbase.payments.common.payment_methods.Venue:
      type: object
      properties:
        name:
          type: string
    coinbase.payments.common.payment_methods.WabIntraBankDetails:
      type: object
      properties:
        account_id:
          type: string
          description: >-
            The account ID of the customer's WAB account for Intra Bank
            Transfer.
        customer_name:
          type: string
          description: The name of the customer.
      description: >-
        WabIntraBankDetails is the details of the customer's WAB account for
        Intra Bank Transfer.
    coinbase.payments.common.payment_methods.WallaceAccount:
      type: object
      properties:
        wallace_account_id:
          type: string
        pool_name:
          type: string
    coinbase.payments.common.payment_methods.WorldpayCardCdvStatus:
      type: object
      properties:
        cdv_required:
          type: boolean
        cdv_failed:
          type: boolean
      title: Card Verification and Status
    coinbase.payments.common.payment_methods.WorldpayParams:
      type: object
      properties:
        token_value:
          type: string
        token_event:
          type: string
        uses_merchant_token:
          type: boolean
        accept_header:
          type: string
        user_agent_header:
          type: string
        shopper_ip:
          type: string
        shopper_session_id:
          type: string
      title: Vendor-Specific Parameters
    coinbase.payments.common.payment_methods.ZaakpayMobikwik:
      type: object
      properties:
        phone_number:
          type: string
      description: Represents a customer's mobikwik account.
    coinbase.payments.common.payment_methods.Zengin:
      type: object
      properties:
        account_holder:
          allOf:
            - $ref: >-
                #/components/schemas/coinbase.payments.common.payment_methods.ZenginAccount
        institution:
          allOf:
            - $ref: >-
                #/components/schemas/coinbase.payments.common.payment_methods.ZenginInstitution
      description: >-
        For withdrawals: contains all info to initiate payment to a Zengin
        eligible bank account. (MUFG-only)

        For deposits: contains info to initiate payment to a Coinbase Fiat
        account.
    coinbase.payments.common.payment_methods.ZenginAccount:
      type: object
      properties:
        legal_name:
          type: string
        identifier:
          type: string
        type:
          type: string
      title: >-
        ZenginAccount represents an account at a financial institution eligible
        for Zengin
    coinbase.payments.common.payment_methods.ZenginInstitution:
      type: object
      properties:
        bank_code:
          type: string
        branch_code:
          type: string
      title: ZenginInstitution is financial institution eligible for Zengin
    coinbase.payments.common.payment_methods.ZenginV2:
      type: object
      properties:
        account_holder:
          allOf:
            - $ref: >-
                #/components/schemas/coinbase.payments.common.payment_methods.ZenginV2Account
        institution:
          allOf:
            - $ref: >-
                #/components/schemas/coinbase.payments.common.payment_methods.ZenginV2Institution
      description: >-
        For withdrawals: contains all info to initiate payment to a Zengin
        eligible bank account (non-MUFG).

        For deposits: contains info to initiate payment to a Coinbase Fiat
        account.
    coinbase.payments.common.payment_methods.ZenginV2Account:
      type: object
      properties:
        legal_name:
          type: string
        identifier:
          type: string
        type:
          type: string
      title: >-
        ZenginV2Account represents an account at a financial institution
        eligible for Zengin (non-MUFG)
    coinbase.payments.common.payment_methods.ZenginV2Institution:
      type: object
      properties:
        bank_code:
          type: string
        branch_code:
          type: string
      title: >-
        ZenginV2Institution is financial institution eligible for Zengin
        (non-MUFG)
    coinbase.payments.common.payment_methods.Zepto:
      type: object
      properties:
        account:
          title: 'AIDoc: The Zepto account information'
          allOf:
            - $ref: >-
                #/components/schemas/coinbase.payments.common.payment_methods.ZeptoAccount
        institution:
          title: 'AIDoc: The Zepto institution information'
          allOf:
            - $ref: >-
                #/components/schemas/coinbase.payments.common.payment_methods.ZeptoInstitution
      title: Zepto identifies the ZEPTO payment method
    coinbase.payments.common.payment_methods.ZeptoAccount:
      type: object
      properties:
        contact_id:
          type: string
          description: It is "Contact.data.id" in Zepto API (https://docs.zepto.money)
          title: 'AIDoc: The Zepto contact ID (UUID) of the account'
        bank_account_id:
          type: string
          description: >-
            It is "contact.data.bank_account.id" in Zepto API
            (https://docs.zepto.money)
          title: 'AIDoc: The Zepto bank account ID (UUID) of contact'
        account_number:
          type: string
          title: 'AIDoc: The account number'
        customer_payment_name:
          type: string
          title: 'AIDoc: The name of the customer making the payment'
      title: 'AIDoc: Zepto account information'
    coinbase.payments.common.payment_methods.ZeptoInstitution:
      type: object
      properties:
        branch_code:
          type: string
          title: 'AIDoc: The branch code for the bank'
      title: 'AIDoc: Zepto institution information'
    coinbase.payments.shared.Money:
      type: object
      properties:
        amount:
          type: string
          description: >-
            The quantity in string.


            For fiat, its unit is the corresponding fractional currency unit.
            For example, "1" means 1 JPY or 0.01 USD when

            currency is JPY or USD respectively. The source of truth for ratio
            to main unit is in http://go/money-fractional.


            Stored as a string because some cryptocurrencies, namely ETH
            supports up to 19 digits of precision which would

            exceed the capacity of storing the value as an int64.
        currency:
          type: string
          description: >-
            Currency in 3-letter ISO4217 code.


            For example, USD, GBP or EUR or in the case of cryptocurrencies its
            3-letter ticker BTC, ETH, XLM etc.


            As of 2019-09-16 there are _no_ clashes between ISO4217 and crypto
            currency abbreviations.
      description: >-
        A quantity of money.


        Note that a few places refer to this file for documentation using Github
        URL. Please search and modify those URLs if

        this file is moved.
    coinbase.portfolio_service.AccountType:
      type: string
      enum:
        - ACCOUNT_TYPE_UNKNOWN_UNSPECIFIED
        - ACCOUNT_TYPE_WALLET
        - ACCOUNT_TYPE_FIAT
        - ACCOUNT_TYPE_VAULT
        - ACCOUNT_TYPE_COLLATERAL
        - ACCOUNT_TYPE_DEFI_YIELD
        - ACCOUNT_TYPE_LOAN_MANAGEMENT
        - ACCOUNT_TYPE_MULTISIG
        - ACCOUNT_TYPE_MULTISIG_VAULT
        - ACCOUNT_TYPE_DERIVATIVES_TRANSFER
        - ACCOUNT_TYPE_DERIVATIVES_EQUITY
        - ACCOUNT_TYPE_STAKED_FUNDS
        - ACCOUNT_TYPE_PERP_FUTURES
        - ACCOUNT_TYPE_PERP_FUTURES_ISOLATED
        - ACCOUNT_TYPE_LENT_FUNDS
        - ACCOUNT_TYPE_PERP_FUTURES_COLLATERAL
        - ACCOUNT_TYPE_DERIVATIVES_CASH
        - ACCOUNT_TYPE_CLAWBACK_DEBT
        - ACCOUNT_TYPE_SUSPENSE_GEOFENCE
        - ACCOUNT_TYPE_RETAIL_DEFI_LEND
        - ACCOUNT_TYPE_DEFI_BORROW_COLLATERAL
        - ACCOUNT_TYPE_FIAT_SAVINGS
        - ACCOUNT_TYPE_RAISE_INVESTMENTS
        - ACCOUNT_TYPE_CCM_EQUITY
        - ACCOUNT_TYPE_PREDICTION_MARKETS_TRANSFER
        - ACCOUNT_TYPE_PREDICTION_MARKETS_EQUITY
        - ACCOUNT_TYPE_PREDICTION_MARKETS_CFM
        - ACCOUNT_TYPE_CREDIT_CARD_COLLATERAL
      default: ACCOUNT_TYPE_UNKNOWN_UNSPECIFIED
      description: AccountType defines the type of account that is supported.
    coinbase.portfolio_service.Amount:
      type: object
      properties:
        value:
          type: string
          description: The amount of specified currency.
        currency:
          type: string
          description: The currency symbol (e.g. USD).
      description: Represents a monetary amount.
    coinbase.portfolio_service.BalancePair:
      type: object
      properties:
        userNativeCurrency:
          allOf:
            - $ref: '#/components/schemas/coinbase.portfolio_service.Amount'
        rawCurrency:
          allOf:
            - $ref: '#/components/schemas/coinbase.portfolio_service.Amount'
      description: >-
        Balance pair represents balances in both native and raw underlying
        currency.
    coinbase.portfolio_service.EquityPosition:
      type: object
      properties:
        cbrn:
          type: string
        account_uuid:
          type: string
        total_balance_fiat:
          allOf:
            - $ref: '#/components/schemas/coinbase.portfolio_service.Amount'
        total_balance_equity:
          allOf:
            - $ref: '#/components/schemas/coinbase.portfolio_service.Amount'
        available_to_trade_equity:
          allOf:
            - $ref: '#/components/schemas/coinbase.portfolio_service.Amount'
        available_to_trade_fiat:
          allOf:
            - $ref: '#/components/schemas/coinbase.portfolio_service.Amount'
        account_type:
          allOf:
            - $ref: '#/components/schemas/coinbase.portfolio_service.AccountType'
        allocation:
          type: number
          format: float
        cost_basis:
          allOf:
            - $ref: '#/components/schemas/coinbase.portfolio_service.Amount'
        average_entry_price:
          allOf:
            - $ref: '#/components/schemas/coinbase.portfolio_service.Amount'
        unrealized_pnl:
          allOf:
            - $ref: '#/components/schemas/coinbase.portfolio_service.Amount'
      description: EquityPosition represents an equity position for a user in a portfolio.
    coinbase.portfolio_service.FuturesPosition:
      type: object
      properties:
        product_id:
          type: string
        contract_size:
          type: string
        side:
          allOf:
            - $ref: >-
                #/components/schemas/coinbase.portfolio_service.FuturesPositionSide
        amount:
          type: string
        avg_entry_price:
          type: string
        current_price:
          type: string
        unrealized_pnl:
          type: string
        expiry:
          type: string
          format: RFC3339 Timestamp
        underlying_asset:
          type: string
        asset_img_url:
          type: string
        product_name:
          type: string
        venue:
          type: string
        notional_value:
          type: string
        asset_color:
          type: string
        last_traded_at:
          type: string
          format: RFC3339 Timestamp
        roll_date:
          type: string
          format: RFC3339 Timestamp
        price_increment:
          type: string
        price_precision:
          type: integer
          format: int32
      title: FuturesPosition represents a futures position
    coinbase.portfolio_service.FuturesPositionSide:
      type: string
      enum:
        - FUTURES_POSITION_SIDE_UNSPECIFIED
        - FUTURES_POSITION_SIDE_LONG
        - FUTURES_POSITION_SIDE_SHORT
      default: FUTURES_POSITION_SIDE_UNSPECIFIED
      description: FuturesPosition defines the side of the position.
    coinbase.portfolio_service.PerpPosition:
      type: object
      properties:
        product_id:
          type: string
        product_uuid:
          type: string
        symbol:
          type: string
        asset_image_url:
          type: string
        vwap:
          allOf:
            - $ref: '#/components/schemas/coinbase.portfolio_service.BalancePair'
        position_side:
          allOf:
            - $ref: >-
                #/components/schemas/coinbase.portfolio_service.FuturesPositionSide
        net_size:
          type: string
        buy_order_size:
          type: string
        sell_order_size:
          type: string
        im_contribution:
          type: string
        unrealized_pnl:
          allOf:
            - $ref: '#/components/schemas/coinbase.portfolio_service.BalancePair'
        mark_price:
          allOf:
            - $ref: '#/components/schemas/coinbase.portfolio_service.BalancePair'
        liquidation_price:
          allOf:
            - $ref: '#/components/schemas/coinbase.portfolio_service.BalancePair'
        leverage:
          type: string
        im_notional:
          allOf:
            - $ref: '#/components/schemas/coinbase.portfolio_service.BalancePair'
        mm_notional:
          allOf:
            - $ref: '#/components/schemas/coinbase.portfolio_service.BalancePair'
        position_notional:
          allOf:
            - $ref: '#/components/schemas/coinbase.portfolio_service.BalancePair'
        margin_type:
          allOf:
            - $ref: >-
                #/components/schemas/coinbase.portfolio_service.PortfolioMarginType
        liquidation_buffer:
          type: string
        liquidation_percentage:
          type: string
        asset_color:
          type: string
      description: PerpPosition defines a perpetuals position.
    coinbase.portfolio_service.Portfolio:
      type: object
      properties:
        name:
          type: string
        uuid:
          type: string
        type:
          allOf:
            - $ref: '#/components/schemas/coinbase.portfolio_service.PortfolioType'
        deleted:
          type: boolean
      description: Portfolio is the identifying information for a portfolio.
    coinbase.portfolio_service.PortfolioBalances:
      type: object
      properties:
        total_balance:
          allOf:
            - $ref: '#/components/schemas/coinbase.portfolio_service.Amount'
        total_futures_balance:
          allOf:
            - $ref: '#/components/schemas/coinbase.portfolio_service.Amount'
        total_cash_equivalent_balance:
          allOf:
            - $ref: '#/components/schemas/coinbase.portfolio_service.Amount'
        total_crypto_balance:
          allOf:
            - $ref: '#/components/schemas/coinbase.portfolio_service.Amount'
        futures_unrealized_pnl:
          allOf:
            - $ref: '#/components/schemas/coinbase.portfolio_service.Amount'
        perp_unrealized_pnl:
          allOf:
            - $ref: '#/components/schemas/coinbase.portfolio_service.Amount'
        total_equities_balance:
          allOf:
            - $ref: '#/components/schemas/coinbase.portfolio_service.Amount'
      description: PortfolioBalances is a summary of all balances within a given portfolio.
    coinbase.portfolio_service.PortfolioBreakdown:
      type: object
      properties:
        portfolio:
          allOf:
            - $ref: '#/components/schemas/coinbase.portfolio_service.Portfolio'
        portfolio_balances:
          allOf:
            - $ref: >-
                #/components/schemas/coinbase.portfolio_service.PortfolioBalances
        spot_positions:
          type: array
          items:
            $ref: '#/components/schemas/coinbase.portfolio_service.PortfolioPosition'
        perp_positions:
          type: array
          items:
            $ref: '#/components/schemas/coinbase.portfolio_service.PerpPosition'
        futures_positions:
          type: array
          items:
            $ref: '#/components/schemas/coinbase.portfolio_service.FuturesPosition'
        prediction_markets_positions:
          type: array
          items:
            $ref: '#/components/schemas/coinbase.portfolio_service.Position'
        equity_positions:
          type: array
          items:
            $ref: '#/components/schemas/coinbase.portfolio_service.EquityPosition'
      description: >-
        PortfolioBreakdown is a breakdown of a portfolio, all balances, and all
        positions within the portfolio.
    coinbase.portfolio_service.PortfolioMarginType:
      type: string
      enum:
        - MARGIN_TYPE_UNSPECIFIED
        - MARGIN_TYPE_CROSS
        - MARGIN_TYPE_ISOLATED
      default: MARGIN_TYPE_UNSPECIFIED
      description: PortfolioMarginType defines the type of margin type.
    coinbase.portfolio_service.PortfolioPosition:
      type: object
      properties:
        asset:
          type: string
        account_uuid:
          type: string
        total_balance_fiat:
          type: number
          format: float
        total_balance_crypto:
          type: number
          format: float
        available_to_trade_fiat:
          type: number
          format: float
        allocation:
          type: number
          format: float
        cost_basis:
          allOf:
            - $ref: '#/components/schemas/coinbase.portfolio_service.Amount'
        asset_img_url:
          type: string
        is_cash:
          type: boolean
        average_entry_price:
          allOf:
            - $ref: '#/components/schemas/coinbase.portfolio_service.Amount'
        asset_uuid:
          type: string
        available_to_trade_crypto:
          type: number
          format: float
        unrealized_pnl:
          type: number
          format: float
        available_to_transfer_fiat:
          type: number
          format: float
        available_to_transfer_crypto:
          type: number
          format: float
        asset_color:
          type: string
        account_type:
          allOf:
            - $ref: '#/components/schemas/coinbase.portfolio_service.AccountType'
        funding_pnl:
          type: number
          format: float
        available_to_send_fiat:
          type: number
          format: float
        available_to_send_crypto:
          type: number
          format: float
      description: PortfolioPosition represents a spot position for a user in a portfolio.
    coinbase.portfolio_service.PortfolioType:
      type: string
      enum:
        - UNDEFINED
        - DEFAULT
        - CONSUMER
        - INTX
      default: UNDEFINED
      description: PortfolioType defines the type of Portfolio.
    coinbase.portfolio_service.Position:
      type: object
      properties:
        product_type:
          allOf:
            - $ref: '#/components/schemas/coinbase.portfolio_service.ProductType'
        cbrn:
          type: string
        prediction_markets:
          title: add more position metadata here as needed
          allOf:
            - $ref: >-
                #/components/schemas/coinbase.portfolio_service.PredictionMarketPositionMetadata
      title: Position represents a unified position across different product types
    coinbase.portfolio_service.PredictionMarketPositionMetadata:
      type: object
      properties:
        side:
          allOf:
            - $ref: >-
                #/components/schemas/coinbase.portfolio_service.PredictionMarketsPositionSide
        last_traded_at:
          type: string
          format: RFC3339 Timestamp
        average_entry_price:
          allOf:
            - $ref: '#/components/schemas/coinbase.portfolio_service.Amount'
        current_price:
          allOf:
            - $ref: '#/components/schemas/coinbase.portfolio_service.Amount'
        unrealized_pnl:
          allOf:
            - $ref: '#/components/schemas/coinbase.portfolio_service.Amount'
        notional_value:
          allOf:
            - $ref: '#/components/schemas/coinbase.portfolio_service.Amount'
        cost_basis:
          allOf:
            - $ref: '#/components/schemas/coinbase.portfolio_service.Amount'
        contracts_owned:
          type: string
        quote_cbrn:
          type: string
      description: PredictionMarketPosition represents a Prediction Markets position.
    coinbase.portfolio_service.PredictionMarketsPositionSide:
      type: string
      enum:
        - PREDICTION_MARKETS_POSITION_SIDE_UNSPECIFIED
        - PREDICTION_MARKETS_POSITION_SIDE_LONG
        - PREDICTION_MARKETS_POSITION_SIDE_SHORT
      default: PREDICTION_MARKETS_POSITION_SIDE_UNSPECIFIED
      description: PredictionMarketPositionSide defines the side of the position.
    coinbase.portfolio_service.ProductType:
      type: string
      enum:
        - PRODUCT_TYPE_UNSPECIFIED
        - PRODUCT_TYPE_ALL
        - PRODUCT_TYPE_SPOT
        - PRODUCT_TYPE_FCM_FUTURES
        - PRODUCT_TYPE_PERP_FUTURES
        - PRODUCT_TYPE_INTX_SPOT
        - PRODUCT_TYPE_DEX
        - PRODUCT_TYPE_EQUITY
        - PRODUCT_TYPE_PREDICTION_MARKETS
        - PRODUCT_TYPE_COMPOSITE_CRYPTO
      default: PRODUCT_TYPE_UNSPECIFIED
      description: ProductType defines the type of product.
    coinbase.positions.CostBasisMethod:
      type: string
      enum:
        - COST_BASIS_METHOD_UNSPECIFIED
        - COST_BASIS_METHOD_HIFO
        - COST_BASIS_METHOD_LIFO
        - COST_BASIS_METHOD_FIFO
      default: COST_BASIS_METHOD_UNSPECIFIED
      description: CostBasisMethod specifies the cost basis method for tax lot matching.
    coinbase.public_api.authed.retail_brokerage_api.Account:
      type: object
      properties:
        uuid:
          type: string
          example: 8bfc20d7-f7c6-4422-bf07-8243ca4169fe
          description: Unique identifier for account.
        name:
          type: string
          example: BTC Wallet
          description: Name for the account.
        currency:
          type: string
          example: BTC
          description: Currency symbol for the account.
        available_balance:
          description: Available balance in the account.
          allOf:
            - $ref: >-
                #/components/schemas/coinbase.public_api.authed.retail_brokerage_api.Amount
        default:
          type: boolean
          example: false
          description: Whether or not this account is the user's primary account
        active:
          type: boolean
          example: true
          description: Whether or not this account is active and okay to use.
        created_at:
          type: string
          format: RFC3339 Timestamp
          example: 2021-05-31T09:59:59.000Z
          description: Time at which this account was created.
        updated_at:
          type: string
          format: RFC3339 Timestamp
          example: 2021-05-31T09:59:59.000Z
          description: Time at which this account was updated.
        deleted_at:
          type: string
          format: RFC3339 Timestamp
          example: 2021-05-31T09:59:59.000Z
          description: Time at which this account was deleted.
        type:
          example: FIAT
          description: What type the account is.
          allOf:
            - $ref: >-
                #/components/schemas/coinbase.public_api.authed.retail_brokerage_api.AccountType
        ready:
          type: boolean
          example: true
          description: Whether or not this account is ready to trade.
        hold:
          description: >-
            Amount that is being held for pending transfers against the
            available balance.
          allOf:
            - $ref: >-
                #/components/schemas/coinbase.public_api.authed.retail_brokerage_api.Amount
        retail_portfolio_id:
          type: string
          example: b87a2d3f-8a1e-49b3-a4ea-402d8c389aca
          description: The ID of the portfolio this account is associated with.
        platform:
          example: ACCOUNT_PLATFORM_CONSUMER
          description: >-
            Platform indicates if the account is for spot (CONSUMER), US
            Derivatives (CFM_CONSUMER), or International Exchange (INTX).
          allOf:
            - $ref: >-
                #/components/schemas/coinbase.public_api.authed.retail_brokerage_api.AccountPlatform
    coinbase.public_api.authed.retail_brokerage_api.AccountPlatform:
      type: string
      enum:
        - ACCOUNT_PLATFORM_UNSPECIFIED
        - ACCOUNT_PLATFORM_CONSUMER
        - ACCOUNT_PLATFORM_CFM_CONSUMER
        - ACCOUNT_PLATFORM_INTX
      default: ACCOUNT_PLATFORM_UNSPECIFIED
    coinbase.public_api.authed.retail_brokerage_api.AccountType:
      type: string
      enum:
        - ACCOUNT_TYPE_UNSPECIFIED
        - ACCOUNT_TYPE_CRYPTO
        - ACCOUNT_TYPE_FIAT
        - ACCOUNT_TYPE_VAULT
        - ACCOUNT_TYPE_PERP_FUTURES
      default: ACCOUNT_TYPE_UNSPECIFIED
      title: Account type defines the type of account that is supported
    coinbase.public_api.authed.retail_brokerage_api.Amount:
      type: object
      properties:
        value:
          type: string
          example: '1.23'
          description: Amount of currency that this object represents.
          required:
            - value
        currency:
          type: string
          example: BTC
          description: Denomination of the currency.
          required:
            - currency
      required:
        - value
        - currency
    coinbase.public_api.authed.retail_brokerage_api.BboData:
      type: object
      properties:
        bid_price:
          type: string
        bid_size:
          type: string
        bid_market_center:
          type: string
        ask_price:
          type: string
        ask_size:
          type: string
        ask_market_center:
          type: string
        timestamp:
          type: string
        is_sip:
          type: boolean
        is_cached:
          type: boolean
        retrieval_time:
          type: string
      title: Best bid/offer data
    coinbase.public_api.authed.retail_brokerage_api.BestBidAskGetProductBookConfig:
      type: object
      properties:
        product_ids:
          type: array
          example:
            - BTC-USD
            - ETH-USD
          items:
            type: string
          description: The list of trading pairs (e.g. 'BTC-USD').
          required:
            - product_ids
    coinbase.public_api.authed.retail_brokerage_api.CancelOrderFailureReason:
      type: string
      enum:
        - UNKNOWN_CANCEL_FAILURE_REASON
        - INVALID_CANCEL_REQUEST
        - UNKNOWN_CANCEL_ORDER
        - COMMANDER_REJECTED_CANCEL_ORDER
        - DUPLICATE_CANCEL_REQUEST
        - INVALID_CANCEL_PRODUCT_ID
        - INVALID_CANCEL_FCM_TRADING_SESSION
        - NOT_ALLOWED_TO_CANCEL
        - ORDER_IS_FULLY_FILLED
        - ORDER_IS_BEING_REPLACED
      default: UNKNOWN_CANCEL_FAILURE_REASON
      title: |-
        - UNKNOWN_CANCEL_FAILURE_REASON: nil value
         - INVALID_CANCEL_REQUEST: Internal error when placing cancel request
         - UNKNOWN_CANCEL_ORDER: Internal error when placing cancel request
         - COMMANDER_REJECTED_CANCEL_ORDER: Internal error when placing cancel request
         - DUPLICATE_CANCEL_REQUEST: Cancel request was placed prior for the same order
         - INVALID_CANCEL_PRODUCT_ID: Invalid product id
         - INVALID_CANCEL_FCM_TRADING_SESSION: Invalid FCM trading session
         - NOT_ALLOWED_TO_CANCEL: Invalid permissions
         - ORDER_IS_FULLY_FILLED: Order is fully filled
         - ORDER_IS_BEING_REPLACED: Order is being replaced
    coinbase.public_api.authed.retail_brokerage_api.CancelOrderResponse:
      type: object
      properties:
        success:
          type: boolean
          example: true
          description: Whether the cancel request was submitted successfully.
          required:
            - success
        failure_reason:
          description: The reason the cancel request did not get submitted
          required:
            - failure_reason
          allOf:
            - $ref: >-
                #/components/schemas/coinbase.public_api.authed.retail_brokerage_api.CancelOrderFailureReason
        order_id:
          type: string
          example: 0000-00000
          description: The ID of the order.
          required:
            - order_id
      required:
        - success
        - failure_reason
        - order_id
    coinbase.public_api.authed.retail_brokerage_api.CancelOrdersRequest:
      type: object
      properties:
        order_ids:
          type: array
          example:
            - 0000-00000
            - 1111-11111
          items:
            type: string
          description: The order IDs that cancel requests should be initiated for.
          required:
            - order_ids
      required:
        - order_ids
    coinbase.public_api.authed.retail_brokerage_api.CancelOrdersResponse:
      type: object
      properties:
        results:
          type: array
          items:
            $ref: >-
              #/components/schemas/coinbase.public_api.authed.retail_brokerage_api.CancelOrderResponse
          description: The result of initiated cancel requests
    coinbase.public_api.authed.retail_brokerage_api.Candle:
      type: object
      properties:
        start:
          type: string
          example: '1639508050'
          description: The UNIX timestamp indicating the start of the time interval.
        low:
          type: string
          example: '140.21'
          description: Lowest price during the bucket interval.
        high:
          type: string
          example: '140.21'
          description: Highest price during the bucket interval.
        open:
          type: string
          example: '140.21'
          description: Opening price (first trade) in the bucket interval.
        close:
          type: string
          example: '140.21'
          description: Closing price (last trade) in the bucket interval.
        volume:
          type: string
          example: '56437345'
          description: Volume of trading activity during the bucket interval.
    coinbase.public_api.authed.retail_brokerage_api.Candles:
      type: object
      properties:
        candles:
          type: array
          items:
            $ref: >-
              #/components/schemas/coinbase.public_api.authed.retail_brokerage_api.Candle
    coinbase.public_api.authed.retail_brokerage_api.ClosePositionRequest:
      type: object
      properties:
        client_order_id:
          type: string
          example: 0000-00000-000000
          description: >-
            The unique ID provided for the order (used for identification
            purposes).
          required:
            - client_order_id
        product_id:
          type: string
          example: BIT-28JUL23-CDE
          description: The trading pair (e.g. 'BIT-28JUL23-CDE').
          required:
            - product_id
        size:
          type: string
          example: 3
          description: The amount of contracts that should be closed.
      required:
        - client_order_id
        - product_id
    coinbase.public_api.authed.retail_brokerage_api.ClosePositionResponse:
      type: object
      properties:
        success:
          type: boolean
          example: true
          description: Whether the order was created.
          required:
            - success
        success_response:
          allOf:
            - $ref: >-
                #/components/schemas/coinbase.public_api.authed.retail_brokerage_api.NewOrderSuccessResponse
        error_response:
          allOf:
            - $ref: >-
                #/components/schemas/coinbase.public_api.authed.retail_brokerage_api.NewOrderErrorResponse
        order_configuration:
          description: The configuration of the order (e.g. the order type, size, etc).
          allOf:
            - $ref: >-
                #/components/schemas/coinbase.public_api.authed.retail_brokerage_api.OrderConfiguration
      required:
        - success
    coinbase.public_api.authed.retail_brokerage_api.CommissionDetailTotal:
      type: object
      properties:
        total_commission:
          type: string
          title: |-
            Total commission amount charged for the order
            This is the sum of all commission charged on the order
        gst_commission:
          type: string
          title: Goods and Services Tax (GST) portion of the commission
        withholding_commission:
          type: string
          title: Tax withholding portion of the commission
        client_commission:
          type: string
          title: Client commission on the trade
        venue_commission:
          type: string
          title: Venue Commission
        regulatory_commission:
          type: string
          title: Regulatory Commission
        clearing_commission:
          type: string
          title: Clearing Commission
      title: >-
        CommissionDetailTotal contains the breakdown of commission charges for
        an order
    coinbase.public_api.authed.retail_brokerage_api.ComplianceLimitData:
      type: object
      properties:
        total_limit:
          allOf:
            - $ref: >-
                #/components/schemas/coinbase.public_api.authed.retail_brokerage_api.Amount
        remaining_limits:
          allOf:
            - $ref: >-
                #/components/schemas/coinbase.public_api.authed.retail_brokerage_api.Amount
      title: Compliance Limit service data
    coinbase.public_api.authed.retail_brokerage_api.ContractExpiryType:
      type: string
      enum:
        - UNKNOWN_CONTRACT_EXPIRY_TYPE
        - EXPIRING
        - PERPETUAL
      default: UNKNOWN_CONTRACT_EXPIRY_TYPE
      description: Represents the types of contract expiry.
    coinbase.public_api.authed.retail_brokerage_api.ContractExpiryTypeFilter:
      type: object
      properties:
        value:
          allOf:
            - $ref: >-
                #/components/schemas/coinbase.public_api.authed.retail_brokerage_api.ContractExpiryType
      title: Filter for contract expiry type
    coinbase.public_api.authed.retail_brokerage_api.CreatePortfolioRequest:
      type: object
      properties:
        name:
          type: string
          description: The name of the portfolio.
    coinbase.public_api.authed.retail_brokerage_api.CreatePortfolioResponse:
      type: object
      properties:
        portfolio:
          allOf:
            - $ref: '#/components/schemas/coinbase.portfolio_service.Portfolio'
    coinbase.public_api.authed.retail_brokerage_api.Date:
      type: object
      properties:
        year:
          type: integer
          format: int32
        month:
          type: integer
          format: int32
        day:
          type: integer
          format: int32
      description: Date represents a calendar date with year, month, and day components.
    coinbase.public_api.authed.retail_brokerage_api.DeletePortfolioResponse:
      type: object
    coinbase.public_api.authed.retail_brokerage_api.DisplayedOrderConfig:
      type: string
      enum:
        - UNKNOWN_DISPLAYED_ORDER_CONFIG
        - INSTANT_GFD
        - LIMIT_GFD
        - LIMIT_GTC
      default: UNKNOWN_DISPLAYED_ORDER_CONFIG
      title: >-
        DisplayedOrderConfig indicates how an order configuration is displayed
        to the user by the front end
    coinbase.public_api.authed.retail_brokerage_api.Edit:
      type: object
      properties:
        price:
          type: string
          example: '19000.00'
          description: The update price of the order.
        size:
          type: string
          example: '0.001'
          description: The updated size of the order.
        replace_accept_timestamp:
          type: string
          format: RFC3339 Timestamp
    coinbase.public_api.authed.retail_brokerage_api.EditOrderError:
      type: object
      properties:
        edit_failure_reason:
          allOf:
            - $ref: >-
                #/components/schemas/coinbase.public_api.authed.retail_brokerage_api.EditOrderFailureReason
        preview_failure_reason:
          allOf:
            - $ref: >-
                #/components/schemas/coinbase.public_api.authed.retail_brokerage_api.PreviewFailureReason
    coinbase.public_api.authed.retail_brokerage_api.EditOrderErrorResponse:
      type: object
      properties:
        error_details:
          type: string
          example: Market orders cannot be placed with empty order sizes
          description: Descriptive error message explaining why the order was not created
        edit_order_failure_reason:
          description: The reason the order failed to be created
          required:
            - edit_order_failure_reason
          allOf:
            - $ref: >-
                #/components/schemas/coinbase.public_api.authed.retail_brokerage_api.EditOrderFailureReason
    coinbase.public_api.authed.retail_brokerage_api.EditOrderFailureReason:
      type: string
      enum:
        - UNKNOWN_EDIT_ORDER_FAILURE_REASON
        - COMMANDER_REJECTED_EDIT_ORDER
        - CANNOT_EDIT_TO_BELOW_FILLED_SIZE
        - ORDER_NOT_FOUND
        - CALLER_ID_MISMATCH
        - ONLY_LIMIT_ORDER_EDITS_SUPPORTED
        - INVALID_EDITED_SIZE
        - INVALID_EDITED_PRICE
        - INVALID_ORIGINAL_SIZE
        - INVALID_ORIGINAL_PRICE
        - EDIT_REQUEST_EQUAL_TO_ORIGINAL_REQUEST
        - ONLY_OPEN_ORDERS_CAN_BE_EDITED
        - SIZE_IN_QUOTE_EDITS_NOT_ALLOWED
        - ORDER_IS_ALREADY_BEING_REPLACED
        - PORTFOLIO_NOT_ALLOWED_FOR_EDITS
        - STRATEGY_NOT_SUPPORTED
        - FIELD_STOPPRICE_NOT_SUPPORTED
        - FIELD_DISPLAYSIZE_NOT_SUPPORTED
        - FIELD_ENDTIME_NOT_SUPPORTED
        - INVALID_ORIGINAL_TIME
        - INVALID_NEW_ENDTIME
        - NOT_STARTED
        - CANNOT_EDIT_FUTURES_ORDER
        - FUTURES_VENUE_ORDER_NOT_FOUND
        - CANNOT_EDIT_STOP_PRICE_FOR_TRIGGERED_ORDER
        - CANNOT_EDIT_ORDER_PENDING_CANCEL
        - INSUFFICIENT_TIME_TO_EDIT
        - EXCEEDED_MAX_ALLOWED_EDIT_REQUEST_COUNT
        - CANNOT_CANCEL_ACTIVE_ATTACHED_ORDER
        - ORDER_EDIT_INVALID_ATTACHED_ORDER_REQUEST
        - ORDER_EDIT_ORDER_TYPE_NOT_SUPPORTED
        - CANNOT_EDIT_TRIGGERED_ORDER
        - INVALID_EDITED_STOP_PRICE
        - INVALID_EDITED_STOP_LIMIT_PRICE
        - INVALID_ORIGINAL_STOP_PRICE
        - INVALID_ORIGINAL_STOP_LIMIT_PRICE
        - INVALID_ORIGINAL_ATTACHED_ORDER_CONFIG
        - CANNOT_EDIT_ATTACHED_ORDER_CONFIGURATION_AFTER_CREATION
        - CANNOT_CONVERT_SIZE_ASSET
        - CANNOT_CONVERT_DISPLAY_SIZE_ASSET
        - CANNOT_EDIT_ATTACHED_ORDER_SIZE_WITH_OPEN_ORIGINATING_ORDER
        - INVALID_EDITED_TAKE_PROFIT_PRICE
        - INVALID_EDITED_STOP_LOSS_PRICE
        - INVALID_EDITED_ATTACHED_ORDER_CONFIGURATION
        - CANNOT_EDIT_ATTACHED_SL_ORDER_PRICE
        - CANNOT_ADD_ATTACHED_ORDER_TO_ORDER_TYPE
        - CANNOT_CHANGE_SIDE_OF_ORDER
        - CANNOT_CHANGE_ORDER_TYPE_OF_ORDER
        - CANNOT_CHANGE_PRODUCT_ID_OF_ORDER
        - PREV_CLIENT_ORDER_ID_REQUIRED_WHEN_CLIENT_ORDER_ID_PROVIDED
        - CLIENT_ORDER_ID_REQUIRED_WHEN_PREV_CLIENT_ORDER_ID_PROVIDED
        - CLIENT_ORDER_ID_MUST_BE_DIFFERENT_FROM_PREV_CLIENT_ORDER_ID
        - PREV_CLIENT_ORDER_ID_MUST_MATCH_CURRENT_CLIENT_ORDER_ID
        - CANNOT_MODIFY_ATTACHED_CONFIG_OF_NON_NEW_ORDER
        - INVALID_EDITED_ATTACHED_ORDER_CONFIGURATION_NON_MODIFIABLE_VALUE_EDIT
        - ATTACHED_CONFIGURATION_IS_EQUAL
        - CANNOT_ADD_LEG_TO_TPSL_ORDER
        - CANNOT_REMOVE_LEG_FROM_TPSL_ORDER
        - SINGLE_LEGGED_BRACKET_ORDER_NOT_ALLOWED
        - SINGLE_LEGGED_ATTACHED_ORDER_CONFIGURATION_NOT_ALLOWED
      default: UNKNOWN_EDIT_ORDER_FAILURE_REASON
      description: >-
        Used to provide detailed error information when an order modification
        request fails.

        This helps clients understand exactly why their edit operation was
        unsuccessful

        and what corrective action might be needed.
    coinbase.public_api.authed.retail_brokerage_api.EditOrderRequest:
      type: object
      properties:
        order_id:
          type: string
          description: The ID of the order.
          required:
            - order_id
        price:
          type: string
          example: '19000.00'
          description: The update price of the order.
          required:
            - price
        size:
          type: string
          example: '0.001'
          description: The updated size of the order.
          required:
            - size
        attached_order_configuration:
          description: >-
            The configuration of the attached order. Only TriggerBracketGtc,
            LimitLimitGtc or StopLimitStopLimitGtc are eligible.
          allOf:
            - $ref: >-
                #/components/schemas/coinbase.public_api.authed.retail_brokerage_api.OrderConfiguration
        cancel_attached_order:
          type: boolean
          example: 'true'
          description: Drops both the legs of TP/SL, order becomes a simple limit order.
        stop_price:
          type: string
          example: '17000.00'
          description: >-
            The updated stop price of the order. Only applicable for editing
            TP/SL or SL orders.
        average_entry_price:
          type: string
          example: '18000.00'
          description: The average entry price of the position. Used for estimated PnL
      required:
        - order_id
        - price
        - size
    coinbase.public_api.authed.retail_brokerage_api.EditOrderResponse:
      type: object
      properties:
        success:
          type: boolean
          example: true
          description: Whether the order edit request was placed.
          required:
            - success
        errors:
          type: array
          items:
            $ref: >-
              #/components/schemas/coinbase.public_api.authed.retail_brokerage_api.EditOrderError
      required:
        - success
    coinbase.public_api.authed.retail_brokerage_api.EditOrderSuccessResponse:
      type: object
      properties:
        order_id:
          type: string
          example: 11111-00000-000000
          description: The ID of the order.
          required:
            - order_id
      required:
        - order_id
    coinbase.public_api.authed.retail_brokerage_api.EditPortfolioRequest:
      type: object
      properties:
        name:
          type: string
          description: The name of the portfolio.
    coinbase.public_api.authed.retail_brokerage_api.EditPortfolioResponse:
      type: object
      properties:
        portfolio:
          allOf:
            - $ref: '#/components/schemas/coinbase.portfolio_service.Portfolio'
    coinbase.public_api.authed.retail_brokerage_api.EquityOrderMetadata:
      type: object
      properties:
        equity_trading_session:
          allOf:
            - $ref: >-
                #/components/schemas/coinbase.public_api.authed.retail_brokerage_api.EquityTradingSession
        current_nbbo:
          allOf:
            - $ref: >-
                #/components/schemas/coinbase.public_api.authed.retail_brokerage_api.NbboData
        last_trade:
          allOf:
            - $ref: >-
                #/components/schemas/coinbase.public_api.authed.retail_brokerage_api.LastTradeData
        last_displayed_nbbo:
          allOf:
            - $ref: >-
                #/components/schemas/coinbase.public_api.authed.retail_brokerage_api.NbboData
        current_bbo:
          allOf:
            - $ref: >-
                #/components/schemas/coinbase.public_api.authed.retail_brokerage_api.BboData
        last_displayed_bbo:
          allOf:
            - $ref: >-
                #/components/schemas/coinbase.public_api.authed.retail_brokerage_api.BboData
        is_bbo_for_internal_use:
          type: boolean
        displayed_order_config:
          allOf:
            - $ref: >-
                #/components/schemas/coinbase.public_api.authed.retail_brokerage_api.DisplayedOrderConfig
        equity_order_date:
          description: Date for the equity order
          allOf:
            - $ref: >-
                #/components/schemas/coinbase.public_api.authed.retail_brokerage_api.Date
        expiration_time:
          type: string
          format: RFC3339 Timestamp
      title: Equity-specific metadata for the order
    coinbase.public_api.authed.retail_brokerage_api.EquityOrderProductDetails:
      type: object
      properties:
        base_cbrn:
          type: string
        ticker:
          type: string
        quote_id:
          type: string
      title: Equity-specific product details
    coinbase.public_api.authed.retail_brokerage_api.EquityProductDetails:
      type: object
      properties:
        equity_subtype:
          allOf:
            - $ref: >-
                #/components/schemas/coinbase.public_api.authed.retail_brokerage_api.EquityProductSubtype
        fractionable:
          type: boolean
        liquidate_only:
          type: boolean
        ticker:
          type: string
        description:
          type: string
        trading_halted:
          type: boolean
        trading_halted_start_time:
          type: string
          format: RFC3339 Timestamp
        trading_halted_end_time:
          type: string
          format: RFC3339 Timestamp
        open_price:
          type: string
        volume_today:
          type: string
        fractional_notional_min_size:
          type: string
        cik:
          type: string
        short_name:
          type: string
        company_description:
          type: string
        company_website:
          type: string
        trading_day_info:
          allOf:
            - $ref: >-
                #/components/schemas/coinbase.public_api.authed.retail_brokerage_api.EquityTradingDayInfo
        current_session:
          allOf:
            - $ref: >-
                #/components/schemas/coinbase.public_api.authed.retail_brokerage_api.EquityTradingSession
        price_percentage_change_market_hours:
          type: string
        price_percentage_change_extended_hours:
          type: string
        opol:
          type: string
        price_percentage_change_market_close:
          type: string
        last_market_day_close_price:
          type: string
        current_market_day_close_price:
          type: string
        recent_trading_days:
          allOf:
            - $ref: >-
                #/components/schemas/coinbase.public_api.authed.retail_brokerage_api.TradingDayData
        equity_trading_flags:
          allOf:
            - $ref: >-
                #/components/schemas/coinbase.public_api.authed.retail_brokerage_api.EquityTradingFlags
    coinbase.public_api.authed.retail_brokerage_api.EquityProductSubtype:
      type: string
      enum:
        - EQUITY_PRODUCT_SUBTYPE_UNSPECIFIED
        - EQUITY_PRODUCT_SUBTYPE_COMMON_STOCK
        - EQUITY_PRODUCT_SUBTYPE_PREFERRED_STOCK
        - EQUITY_PRODUCT_SUBTYPE_PREFERRED_ADR
        - EQUITY_PRODUCT_SUBTYPE_SPECIAL_STOCK
        - EQUITY_PRODUCT_SUBTYPE_INDEX
        - EQUITY_PRODUCT_SUBTYPE_WARRANT
        - EQUITY_PRODUCT_SUBTYPE_ADR
        - EQUITY_PRODUCT_SUBTYPE_RIGHTS
        - EQUITY_PRODUCT_SUBTYPE_SHARES_OF_BENEFICIAL_INTEREST
        - EQUITY_PRODUCT_SUBTYPE_CERTIFICATES
        - EQUITY_PRODUCT_SUBTYPE_UNITS
        - EQUITY_PRODUCT_SUBTYPE_DEBT_ISSUE
        - EQUITY_PRODUCT_SUBTYPE_OPTION
        - EQUITY_PRODUCT_SUBTYPE_ETF
      default: EQUITY_PRODUCT_SUBTYPE_UNSPECIFIED
      description: Defines the subtype of an equity product.
    coinbase.public_api.authed.retail_brokerage_api.EquityProductSubtypeFilter:
      type: object
      properties:
        value:
          allOf:
            - $ref: >-
                #/components/schemas/coinbase.public_api.authed.retail_brokerage_api.EquityProductSubtype
      title: Filter for Equity Product Subtype
    coinbase.public_api.authed.retail_brokerage_api.EquityProductSubtypesFilter:
      type: object
      properties:
        value:
          type: array
          items:
            $ref: >-
              #/components/schemas/coinbase.public_api.authed.retail_brokerage_api.EquityProductSubtype
      title: Filter for Equity Product Subtypes
    coinbase.public_api.authed.retail_brokerage_api.EquityTradeDateType:
      type: string
      enum:
        - TRADE_DATE_TYPE_UNSPECIFIED
        - TRADE_DATE_TYPE_REGULAR
        - TRADE_DATE_TYPE_EARLY_CLOSE
        - TRADE_DATE_TYPE_FULL_CLOSE
      default: TRADE_DATE_TYPE_UNSPECIFIED
      title: Enum representing the type of trading date
    coinbase.public_api.authed.retail_brokerage_api.EquityTradingDayInfo:
      type: object
      properties:
        venue_id:
          type: string
        date:
          type: string
        trade_date_type:
          allOf:
            - $ref: >-
                #/components/schemas/coinbase.public_api.authed.retail_brokerage_api.EquityTradeDateType
        holiday_name:
          type: string
        version_id:
          type: string
        trading_sessions:
          type: array
          items:
            $ref: >-
              #/components/schemas/coinbase.public_api.authed.retail_brokerage_api.EquityTradingSessionWindow
        market_open_price:
          type: string
        market_close_price:
          type: string
      title: >-
        EquityTradingDayInfo contains trading day and session information for an
        equity venue
    coinbase.public_api.authed.retail_brokerage_api.EquityTradingFlags:
      type: object
      properties:
        tradable:
          type: boolean
        searchable:
          type: boolean
        buy_enabled:
          type: boolean
        buy_whole_shares:
          type: boolean
        buy_fractional_shares:
          type: boolean
        buy_notional:
          type: boolean
        sell_enabled:
          type: boolean
        sell_whole_shares:
          type: boolean
        sell_fractional_shares:
          type: boolean
        sell_notional:
          type: boolean
      title: >-
        EquityTradingFlags contains granular trading permissions for equity
        products
    coinbase.public_api.authed.retail_brokerage_api.EquityTradingSession:
      type: string
      enum:
        - UNKNOWN_EQUITY_TRADING_SESSION
        - EQUITY_TRADING_SESSION_NORMAL
        - EQUITY_TRADING_SESSION_AFTER_HOURS
        - EQUITY_TRADING_SESSION_MULTI_SESSION
        - EQUITY_TRADING_SESSION_OVERNIGHT
        - EQUITY_TRADING_SESSION_PRE_MARKET
      default: UNKNOWN_EQUITY_TRADING_SESSION
    coinbase.public_api.authed.retail_brokerage_api.EquityTradingSessionWindow:
      type: object
      properties:
        session_type:
          allOf:
            - $ref: >-
                #/components/schemas/coinbase.public_api.authed.retail_brokerage_api.EquityTradingSession
        session_start_time:
          type: string
          format: RFC3339 Timestamp
        session_end_time:
          type: string
          format: RFC3339 Timestamp
        support_fractional:
          type: boolean
        limit_only:
          type: boolean
      title: TradingWindow represents a trading session window within a trading day
    coinbase.public_api.authed.retail_brokerage_api.ExpiringContractStatus:
      type: string
      enum:
        - UNKNOWN_EXPIRING_CONTRACT_STATUS
        - STATUS_UNEXPIRED
        - STATUS_EXPIRED
        - STATUS_ALL
      default: UNKNOWN_EXPIRING_CONTRACT_STATUS
      description: Defines the status of expiring contracts.
    coinbase.public_api.authed.retail_brokerage_api.ExpiringContractStatusFilter:
      type: object
      properties:
        value:
          allOf:
            - $ref: >-
                #/components/schemas/coinbase.public_api.authed.retail_brokerage_api.ExpiringContractStatus
      title: Filter for expiring contract status
    coinbase.public_api.authed.retail_brokerage_api.FcmScheduledMaintenance:
      type: object
      properties:
        start_time:
          type: string
          format: RFC3339 Timestamp
        end_time:
          type: string
          format: RFC3339 Timestamp
      description: Fcm specific scheduled maintenance details.
    coinbase.public_api.authed.retail_brokerage_api.FcmTradingSessionClosedReason:
      type: string
      enum:
        - FCM_TRADING_SESSION_CLOSED_REASON_UNDEFINED
        - FCM_TRADING_SESSION_CLOSED_REASON_REGULAR_MARKET_CLOSE
        - FCM_TRADING_SESSION_CLOSED_REASON_EXCHANGE_MAINTENANCE
        - FCM_TRADING_SESSION_CLOSED_REASON_VENDOR_MAINTENANCE
      default: FCM_TRADING_SESSION_CLOSED_REASON_UNDEFINED
      description: >-
        This helps distinguish between regular market close and downtimes due to
        maintenance.
    coinbase.public_api.authed.retail_brokerage_api.FcmTradingSessionDetails:
      type: object
      properties:
        is_session_open:
          type: boolean
        open_time:
          type: string
          format: RFC3339 Timestamp
        close_time:
          type: string
          format: RFC3339 Timestamp
        session_state:
          allOf:
            - $ref: >-
                #/components/schemas/coinbase.public_api.authed.retail_brokerage_api.FcmTradingSessionState
        after_hours_order_entry_disabled:
          type: boolean
        closed_reason:
          allOf:
            - $ref: >-
                #/components/schemas/coinbase.public_api.authed.retail_brokerage_api.FcmTradingSessionClosedReason
        maintenance:
          allOf:
            - $ref: >-
                #/components/schemas/coinbase.public_api.authed.retail_brokerage_api.FcmScheduledMaintenance
    coinbase.public_api.authed.retail_brokerage_api.FcmTradingSessionState:
      type: string
      enum:
        - FCM_TRADING_SESSION_STATE_UNDEFINED
        - FCM_TRADING_SESSION_STATE_PRE_OPEN
        - FCM_TRADING_SESSION_STATE_PRE_OPEN_NO_CANCEL
        - FCM_TRADING_SESSION_STATE_OPEN
        - FCM_TRADING_SESSION_STATE_CLOSE
        - FCM_TRADING_SESSION_STATE_HALTED
      default: FCM_TRADING_SESSION_STATE_UNDEFINED
      description: Defines the state of a trading session.
    coinbase.public_api.authed.retail_brokerage_api.FeeTier:
      type: object
      properties:
        pricing_tier:
          type: string
          example: <$10k
          description: Pricing tier for user, determined by notional (USD) volume.
        taker_fee_rate:
          type: string
          example: '0.0010'
          description: Taker fee rate, applied if the order takes liquidity.
        maker_fee_rate:
          type: string
          example: '0.0020'
          description: Maker fee rate, applied if the order creates liquidity.
        aop_from:
          type: string
          example: '0'
          description: >-
            Lower bound (inclusive) of pricing tier in usd of total assets on
            platform.
        aop_to:
          type: string
          example: '10000'
          description: >-
            Upper bound (exclusive) of pricing tier in usd of total assets on
            platform.
        volume_types_and_range:
          type: array
          example:
            - volume_types:
                - VOLUME_TYPE_SPOT
                - VOLUME_TYPE_US_DERIVATIVES
              vol_from: '0'
              vol_to: '50000'
          items:
            $ref: >-
              #/components/schemas/coinbase.public_api.authed.retail_brokerage_api.VolumeTypesAndRange
          description: >-
            List of rules that define how a tier evaluates 30-day volume by
            combining specific volume types.
    coinbase.public_api.authed.retail_brokerage_api.Fill:
      type: object
      properties:
        entry_id:
          type: string
          example: 22222-2222222-22222222
          description: Unique identifier for the fill.
        trade_id:
          type: string
          example: 1111-11111-111111
          description: >-
            ID of the fill -- unique for all `FILL` trade_types but not unique
            for adjusted fills.
        order_id:
          type: string
          example: 0000-000000-000000
          description: The ID of the order.
        trade_time:
          type: string
          format: RFC3339 Timestamp
          example: 2021-05-31T09:59:59.000Z
          description: Time at which this fill was completed.
        trade_type:
          type: string
          example: FILL
          description: >-
            String denoting what type of fill this is. Regular fills have the
            value `FILL`. Adjusted fills have possible values `REVERSAL`,
            `CORRECTION`, `SYNTHETIC`.
        price:
          type: string
          example: '10000.00'
          description: Price the fill was posted at.
        size:
          type: string
          example: '0.001'
          description: Amount of order that was transacted at this fill.
        commission:
          type: string
          example: '1.25'
          description: Fee amount for fill.
        product_id:
          type: string
          example: BTC-USD
          description: The trading pair (e.g. 'BTC-USD').
        sequence_timestamp:
          type: string
          format: RFC3339 Timestamp
          example: 2021-05-31T09:58:59.000Z
          description: Time at which this fill was posted.
        liquidity_indicator:
          description: Whether this fill gives or takes liquidity.
          allOf:
            - $ref: >-
                #/components/schemas/coinbase.public_api.authed.retail_brokerage_api.LiquidityIndicator
        size_in_quote:
          type: boolean
          example: false
          description: Whether the order was placed with quote currency.
        user_id:
          type: string
          example: 3333-333333-3333333
          description: User that placed the order the fill belongs to.
        side:
          description: Side of order that this fill belongs to.
          allOf:
            - $ref: >-
                #/components/schemas/coinbase.public_api.authed.retail_brokerage_api.OrderSide
        retail_portfolio_id:
          type: string
          example: 4444-444444-4444444
          description: Portfolio that the order fill belongs to.
        fillSource:
          description: Field denoting what type of fill source was used for this fill.
          title: Represents a fill source type used
          allOf:
            - $ref: >-
                #/components/schemas/coinbase.public_api.authed.retail_brokerage_api.FillSource
        commission_detail_total:
          description: Breakdown of commission charges for the fill
          allOf:
            - $ref: >-
                #/components/schemas/coinbase.public_api.authed.retail_brokerage_api.CommissionDetailTotal
      title: Represents a fill for an order in the system
    coinbase.public_api.authed.retail_brokerage_api.FillSource:
      type: string
      enum:
        - FILL_SOURCE_UNKNOWN
        - FILL_SOURCE_CLOB
        - FILL_SOURCE_RFQ
      default: FILL_SOURCE_UNKNOWN
      title: Represents the source of a fill in the system
    coinbase.public_api.authed.retail_brokerage_api.FutureProductDetails:
      type: object
      properties:
        venue:
          type: string
        contract_code:
          type: string
        contract_expiry:
          type: string
          format: RFC3339 Timestamp
        contract_size:
          type: string
        contract_root_unit:
          type: string
        group_description:
          type: string
        contract_expiry_timezone:
          type: string
        group_short_description:
          type: string
        risk_managed_by:
          allOf:
            - $ref: >-
                #/components/schemas/coinbase.public_api.authed.retail_brokerage_api.RiskManagementType
        contract_expiry_type:
          description: The contract expiry type (e.g. 'EXPIRING').
          allOf:
            - $ref: >-
                #/components/schemas/coinbase.public_api.authed.retail_brokerage_api.ContractExpiryType
        perpetual_details:
          allOf:
            - $ref: >-
                #/components/schemas/coinbase.public_api.authed.retail_brokerage_api.PerpetualProductDetails
        contract_display_name:
          type: string
        time_to_expiry_ms:
          type: string
          format: int64
        non_crypto:
          type: boolean
        contract_expiry_name:
          type: string
        twenty_four_by_seven:
          type: boolean
        funding_interval:
          type: string
        open_interest:
          type: string
        funding_rate:
          type: string
        funding_time:
          type: string
          format: RFC3339 Timestamp
        display_name:
          type: string
        region_enabled:
          type: object
          additionalProperties:
            type: boolean
        intraday_margin_rate:
          description: Margin rates during intraday trading hours
          allOf:
            - $ref: >-
                #/components/schemas/coinbase.public_api.authed.retail_brokerage_api.MarginRate
        overnight_margin_rate:
          description: Margin rates during overnight trading hours
          allOf:
            - $ref: >-
                #/components/schemas/coinbase.public_api.authed.retail_brokerage_api.MarginRate
        settlement_price:
          type: string
          description: The most recent official settlement price for the futures contract
        futures_asset_type:
          allOf:
            - $ref: >-
                #/components/schemas/coinbase.public_api.authed.retail_brokerage_api.FuturesAssetType
        index_price:
          type: string
          description: >-
            The index price for the futures contract, used for mark-to-market
            and PnL calculations
        contract_code_display_name:
          type: string
        product_group_cbrn:
          type: string
          description: The CBRN of the product group this future belongs to
    coinbase.public_api.authed.retail_brokerage_api.FuturesAssetType:
      type: string
      enum:
        - UNKNOWN_FUTURES_ASSET_TYPE
        - FUTURES_ASSET_TYPE_CRYPTO
        - FUTURES_ASSET_TYPE_METALS
        - FUTURES_ASSET_TYPE_ENERGY
        - FUTURES_ASSET_TYPE_STOCKS
      default: UNKNOWN_FUTURES_ASSET_TYPE
      description: >-
        Asset type for futures/derivatives products.

        Other product types (Equity, Prediction Market) will have their own
        enums.
    coinbase.public_api.authed.retail_brokerage_api.FuturesAssetTypeFilter:
      type: object
      properties:
        value:
          allOf:
            - $ref: >-
                #/components/schemas/coinbase.public_api.authed.retail_brokerage_api.FuturesAssetType
      title: Filter for futures asset type (Crypto, Metals, Energy, Stocks)
    coinbase.public_api.authed.retail_brokerage_api.FuturesAssetTypesFilter:
      type: object
      properties:
        value:
          type: array
          items:
            $ref: >-
              #/components/schemas/coinbase.public_api.authed.retail_brokerage_api.FuturesAssetType
      title: Filter for multiple futures asset types (Crypto, Metals, Energy, Stocks)
    coinbase.public_api.authed.retail_brokerage_api.FuturesUnderlyingType:
      type: string
      enum:
        - UNKNOWN_FUTURES_UNDERLYING_TYPE
        - FUTURES_UNDERLYING_TYPE_SPOT
        - FUTURES_UNDERLYING_TYPE_INDEX
        - FUTURES_UNDERLYING_TYPE_EQUITY
        - FUTURES_UNDERLYING_TYPE_EQUITY_INDEX
        - FUTURES_UNDERLYING_TYPE_EQUITY_ETF
        - FUTURES_UNDERLYING_TYPE_PREIPO
        - FUTURES_UNDERLYING_TYPE_COMMOD
        - FUTURES_UNDERLYING_TYPE_COMMOD_ETF
        - FUTURES_UNDERLYING_TYPE_COMMOD_INDEX
        - FUTURES_UNDERLYING_TYPE_ADR
        - FUTURES_UNDERLYING_TYPE_FOREIGN_EQUITY
        - FUTURES_UNDERLYING_TYPE_OTC
      default: UNKNOWN_FUTURES_UNDERLYING_TYPE
      description: Specifies what type of underlying asset a futures contract is based on.
    coinbase.public_api.authed.retail_brokerage_api.GetAccountResponse:
      type: object
      properties:
        account:
          allOf:
            - $ref: >-
                #/components/schemas/coinbase.public_api.authed.retail_brokerage_api.Account
    coinbase.public_api.authed.retail_brokerage_api.GetAccountsResponse:
      type: object
      properties:
        accounts:
          type: array
          items:
            $ref: >-
              #/components/schemas/coinbase.public_api.authed.retail_brokerage_api.Account
        has_next:
          type: boolean
          example: true
          description: Whether there are additional pages for this query.
          required:
            - has_next
        cursor:
          type: string
          example: '789100'
          description: >-
            For paginated responses, returns all responses that come after this
            value.
        size:
          type: integer
          format: int32
          description: Number of accounts returned
      required:
        - has_next
    coinbase.public_api.authed.retail_brokerage_api.GetBestBidAskResponse:
      type: object
      properties:
        pricebooks:
          type: array
          items:
            $ref: >-
              #/components/schemas/coinbase.public_api.authed.retail_brokerage_api.PriceBook
          required:
            - pricebooks
      required:
        - pricebooks
    coinbase.public_api.authed.retail_brokerage_api.GetCandlesResponse:
      type: object
      properties:
        body:
          allOf:
            - $ref: >-
                #/components/schemas/coinbase.public_api.authed.retail_brokerage_api.Candles
    coinbase.public_api.authed.retail_brokerage_api.GetFillsRequest.FillsSortBy:
      type: string
      enum:
        - UNKNOWN_SORT_BY
        - PRICE
        - TRADE_TIME
      default: UNKNOWN_SORT_BY
    coinbase.public_api.authed.retail_brokerage_api.GetFillsResponse:
      type: object
      properties:
        fills:
          type: array
          items:
            $ref: >-
              #/components/schemas/coinbase.public_api.authed.retail_brokerage_api.Fill
          description: All fills matching the filters.
        cursor:
          type: string
          example: '789100'
          description: >-
            For paginated responses, returns all responses that come after this
            value.
        proof_token_required:
          type: boolean
          example: true
          description: >-
            Indicates that a valid proof token is required to access this data
            (EU SCA compliance).
    coinbase.public_api.authed.retail_brokerage_api.GetHistoricalOrderResponse:
      type: object
      properties:
        order:
          description: The retrieved order.
          allOf:
            - $ref: >-
                #/components/schemas/coinbase.public_api.authed.retail_brokerage_api.Order
    coinbase.public_api.authed.retail_brokerage_api.GetHistoricalOrdersRequest.HistoricalOrdersSortBy:
      type: string
      enum:
        - UNKNOWN_SORT_BY
        - LIMIT_PRICE
        - LAST_FILL_TIME
        - LAST_UPDATE_TIME
      default: UNKNOWN_SORT_BY
    coinbase.public_api.authed.retail_brokerage_api.GetHistoricalOrdersResponse:
      type: object
      properties:
        orders:
          type: array
          items:
            $ref: >-
              #/components/schemas/coinbase.public_api.authed.retail_brokerage_api.Order
          description: A list of orders matching the query.
          required:
            - orders
        sequence:
          type: string
          format: int64
          description: >-
            **(Deprecated)** The sequence of the db at which this state was
            read.
        has_next:
          type: boolean
          example: true
          description: Whether there are additional pages for this query.
          required:
            - has_next
        cursor:
          type: string
          example: '789100'
          description: >-
            For paginated responses, returns all responses that come after this
            value.
        proof_token_required:
          type: boolean
          example: true
          description: >-
            Indicates that a valid proof token is required to access this data
            (EU SCA compliance).
      required:
        - orders
        - has_next
    coinbase.public_api.authed.retail_brokerage_api.GetMarketTradesResponse:
      type: object
      properties:
        trades:
          type: array
          items:
            $ref: >-
              #/components/schemas/coinbase.public_api.authed.retail_brokerage_api.HistoricalMarketTrade
        best_bid:
          type: string
          example: '291.13'
          description: The best bid for the `product_id`, in quote currency.
        best_ask:
          type: string
          example: '292.40'
          description: The best ask for the `product_id`, in quote currency.
    coinbase.public_api.authed.retail_brokerage_api.GetPortfolioBreakdownResponse:
      type: object
      properties:
        breakdown:
          allOf:
            - $ref: >-
                #/components/schemas/coinbase.portfolio_service.PortfolioBreakdown
    coinbase.public_api.authed.retail_brokerage_api.GetPortfoliosResponse:
      type: object
      properties:
        portfolios:
          type: array
          items:
            $ref: '#/components/schemas/coinbase.portfolio_service.Portfolio'
    coinbase.public_api.authed.retail_brokerage_api.GetProductBookResponse:
      type: object
      properties:
        pricebook:
          required:
            - pricebook
          allOf:
            - $ref: >-
                #/components/schemas/coinbase.public_api.authed.retail_brokerage_api.PriceBook
        last:
          type: string
        mid_market:
          type: string
        spread_bps:
          type: string
        spread_absolute:
          type: string
      required:
        - pricebook
    coinbase.public_api.authed.retail_brokerage_api.GetProductResponse:
      type: object
      properties:
        body:
          allOf:
            - $ref: >-
                #/components/schemas/coinbase.public_api.authed.retail_brokerage_api.Product
    coinbase.public_api.authed.retail_brokerage_api.GetProductsResponse:
      type: object
      properties:
        body:
          allOf:
            - $ref: >-
                #/components/schemas/coinbase.public_api.authed.retail_brokerage_api.Products
      description: >-
        Response message for the GetProducts RPC call, containing a list of
        products and pagination information.
    coinbase.public_api.authed.retail_brokerage_api.GetTransactionSummaryResponse:
      type: object
      properties:
        total_fees:
          type: number
          format: double
          example: 25
          description: Total fees across assets, denoted in USD.
          required:
            - total_fees
        fee_tier:
          description: >-
            Description of maker and taker rates across all applicable fee
            tiers.
          required:
            - fee_tier
          allOf:
            - $ref: >-
                #/components/schemas/coinbase.public_api.authed.retail_brokerage_api.FeeTier
        margin_rate:
          example: 0.5
          description: Margin rate, only applicable to product_type `FUTURE`.
          allOf:
            - $ref: '#/components/schemas/coinbase.brokerage.types.Decimal'
        goods_and_services_tax:
          allOf:
            - $ref: >-
                #/components/schemas/coinbase.public_api.authed.retail_brokerage_api.GoodsAndServicesTax
        advanced_trade_only_volume:
          type: number
          format: double
          example: 1000
          description: >-
            Advanced Trade volume (non-inclusive of Pro) across assets, denoted
            in USD.
        advanced_trade_only_fees:
          type: number
          format: double
          example: 25
          description: >-
            Advanced Trade fees (non-inclusive of Pro) across assets, denoted in
            USD.
        coinbase_pro_volume:
          type: number
          format: double
          example: 1000
          description: Coinbase Pro volume across assets, denoted in USD.
        coinbase_pro_fees:
          type: number
          format: double
          example: 25
          description: Coinbase Pro fees across assets, denoted in USD.
        total_balance:
          type: string
          example: '1000'
          description: >-
            Total balance across assets and products, which is comprised of the
            sum of spot, intx, and fcm, and denoted in USD.
        volume_breakdown:
          type: array
          example:
            - volume_type: VOLUME_TYPE_SPOT
              volume: 1000
          items:
            $ref: >-
              #/components/schemas/coinbase.public_api.authed.retail_brokerage_api.Volume
          description: Breakdown of volumes that contributed to the fee tier calculation.
        has_cost_plus_commission:
          type: boolean
          example: false
          description: Indicates whether the user uses cost plus commission pricing model.
      required:
        - total_volume
        - total_fees
        - fee_tier
    coinbase.public_api.authed.retail_brokerage_api.GoodsAndServicesTax:
      type: object
      properties:
        rate:
          type: string
        type:
          allOf:
            - $ref: >-
                #/components/schemas/coinbase.public_api.authed.retail_brokerage_api.GstType
    coinbase.public_api.authed.retail_brokerage_api.Granularity:
      type: string
      enum:
        - UNKNOWN_GRANULARITY
        - ONE_MINUTE
        - FIVE_MINUTE
        - FIFTEEN_MINUTE
        - THIRTY_MINUTE
        - ONE_HOUR
        - TWO_HOUR
        - FOUR_HOUR
        - SIX_HOUR
        - ONE_DAY
      default: UNKNOWN_GRANULARITY
    coinbase.public_api.authed.retail_brokerage_api.GstType:
      type: string
      enum:
        - INCLUSIVE
        - EXCLUSIVE
      default: INCLUSIVE
      title: >-
        - INCLUSIVE: inclusive means the `feeTier`` is inclusive of the GST (e.g
        SG)
         - EXCLUSIVE: exclusive means the `feeTier`` is exclusive of the GST (e.g AU)
    coinbase.public_api.authed.retail_brokerage_api.HistoricalMarketTrade:
      type: object
      properties:
        trade_id:
          type: string
          example: 34b080bf-fcfd-445a-832b-46b5ddc65601
          description: The ID of the trade that was placed.
        product_id:
          type: string
          example: BTC-USD
          description: The trading pair (e.g. 'BTC-USD').
        price:
          type: string
          example: '140.91'
          description: The price of the trade, in quote currency.
        size:
          type: string
          example: '4'
          description: The size of the trade, in base currency.
        time:
          type: string
          format: RFC3339 Timestamp
          example: 2021-05-31T09:59:59.000Z
          description: The time of the trade.
        side:
          description: The maker side of the trade.
          allOf:
            - $ref: >-
                #/components/schemas/coinbase.public_api.authed.retail_brokerage_api.OrderSide
        exchange:
          type: string
          description: The exchange where the trade was placed.
    coinbase.public_api.authed.retail_brokerage_api.L2Level:
      type: object
      properties:
        price:
          type: string
        size:
          type: string
    coinbase.public_api.authed.retail_brokerage_api.LastTradeData:
      type: object
      properties:
        price:
          type: string
        size:
          type: string
        timestamp:
          type: string
        market_center:
          type: string
        is_sip:
          type: boolean
        is_cached:
          type: boolean
        retrieval_time:
          type: string
      title: Last trade data
    coinbase.public_api.authed.retail_brokerage_api.LimitLimitFok:
      type: object
      properties:
        quote_size:
          type: string
          example: '10.00'
          description: >-
            The amount of the second Asset in the Trading Pair. For example, on
            the BTC/USD Order Book, USD is the Quote Asset.
        base_size:
          type: string
          example: '0.001'
          description: >-
            The amount of the first Asset in the Trading Pair. For example, on
            the BTC-USD Order Book, BTC is the Base Asset.
        limit_price:
          type: string
          example: '10000.00'
          description: >-
            The specified price, or better, that the Order should be executed
            at. A Buy Order will execute at or lower than the limit price. A
            Sell Order will execute at or higher than the limit price.
        rfq_disabled:
          type: boolean
          description: >-
            If true, or if the user is a non-EU region user, this order will be
            attempted to be routed to the exchange CLOB.
    coinbase.public_api.authed.retail_brokerage_api.LimitLimitGtc:
      type: object
      properties:
        quote_size:
          type: string
          example: '10.00'
          description: >-
            The amount of the second Asset in the Trading Pair. For example, on
            the BTC/USD Order Book, USD is the Quote Asset.
        base_size:
          type: string
          example: '0.001'
          description: >-
            The amount of the first Asset in the Trading Pair. For example, on
            the BTC-USD Order Book, BTC is the Base Asset.
        limit_price:
          type: string
          example: '10000.00'
          description: >-
            The specified price, or better, that the Order should be executed
            at. A Buy Order will execute at or lower than the limit price. A
            Sell Order will execute at or higher than the limit price.
        post_only:
          type: boolean
          example: false
          description: >-
            Enable or disable Post-only Mode. When enabled, only Maker Orders
            will be posted to the Order Book. Orders that will be posted as a
            Taker Order will be rejected.
        rfq_disabled:
          type: boolean
          description: >-
            If true, or if the user is a non-EU region user, this order will be
            attempted to be routed to the exchange CLOB.
    coinbase.public_api.authed.retail_brokerage_api.LimitLimitGtd:
      type: object
      properties:
        quote_size:
          type: string
          example: '10.00'
          description: >-
            The amount of the second Asset in the Trading Pair. For example, on
            the BTC/USD Order Book, USD is the Quote Asset.
        base_size:
          type: string
          example: '0.001'
          description: >-
            The amount of the first Asset in the Trading Pair. For example, on
            the BTC-USD Order Book, BTC is the Base Asset.
        limit_price:
          type: string
          example: '10000.00'
          description: >-
            The specified price, or better, that the Order should be executed
            at. A Buy Order will execute at or lower than the limit price. A
            Sell Order will execute at or higher than the limit price.
        end_time:
          type: string
          format: RFC3339 Timestamp
          example: 2021-05-31T09:59:59.000Z
          description: The time at which the order will be cancelled if it is not Filled.
        post_only:
          type: boolean
          example: false
          description: >-
            Enable or disable Post-only Mode. When enabled, only Maker Orders
            will be posted to the Order Book. Orders that will be posted as a
            Taker Order will be rejected.
    coinbase.public_api.authed.retail_brokerage_api.LiquidationMarketGtc:
      type: object
      properties:
        base_size:
          type: string
          example: 0.001
          description: >-
            The amount of the first Asset in the Trading Pair. For example, on
            the BTC-USD Order Book, BTC is the Base Asset.
    coinbase.public_api.authed.retail_brokerage_api.LiquidationMarketGtd:
      type: object
      properties:
        base_size:
          type: string
          example: 0.001
          description: >-
            The amount of the first Asset in the Trading Pair. For example, on
            the BTC-USD Order Book, BTC is the Base Asset.
        end_time:
          type: string
          format: RFC3339 Timestamp
          example: 2021-05-31T09:59:59.000Z
          description: The time at which the order will be cancelled if it is not Filled.
    coinbase.public_api.authed.retail_brokerage_api.LiquidityIndicator:
      type: string
      enum:
        - UNKNOWN_LIQUIDITY_INDICATOR
        - MAKER
        - TAKER
      default: UNKNOWN_LIQUIDITY_INDICATOR
    coinbase.public_api.authed.retail_brokerage_api.MarginRate:
      type: object
      properties:
        long_margin_rate:
          type: string
          example: '0.5'
          description: Long margin rate
        short_margin_rate:
          type: string
          example: '0.5'
          description: Short margin rate
      title: Margin rate information for futures products
    coinbase.public_api.authed.retail_brokerage_api.MarginRatioData:
      type: object
      properties:
        current_margin_ratio:
          type: string
        projected_margin_ratio:
          type: string
      title: >-
        New margin ratio fields replacing current_liquidation_buffer and
        projected_liquidation_buffer
    coinbase.public_api.authed.retail_brokerage_api.MarginType:
      type: string
      enum:
        - CROSS
        - ISOLATED
      default: ''
      description: >-
        - CROSS: Cross margin applies margin to the position of the entire
        portfolio
         - ISOLATED: Isolated margin applies margin to a single position
      title: >-
        MarginType reflects the margin type of an order, used for Intx Perps
        trades
    coinbase.public_api.authed.retail_brokerage_api.MarketMarketFok:
      type: object
      properties:
        quote_size:
          type: string
          example: '10.00'
          description: >-
            The amount of the second Asset in the Trading Pair. For example, on
            the BTC/USD Order Book, USD is the Quote Asset.
        base_size:
          type: string
          example: '0.001'
          description: >-
            The amount of the first Asset in the Trading Pair. For example, on
            the BTC-USD Order Book, BTC is the Base Asset.
        rfq_disabled:
          type: boolean
          description: >-
            If true, or if the user is a non-EU region user, this order will be
            attempted to be routed to the exchange CLOB.
    coinbase.public_api.authed.retail_brokerage_api.MarketMarketIoc:
      type: object
      properties:
        quote_size:
          type: string
          example: '10.00'
          description: >-
            The amount of the second Asset in the Trading Pair. For example, on
            the BTC/USD Order Book, USD is the Quote Asset.
        base_size:
          type: string
          example: '0.001'
          description: >-
            The amount of the first Asset in the Trading Pair. For example, on
            the BTC-USD Order Book, BTC is the Base Asset.
        rfq_disabled:
          type: boolean
          description: >-
            If true, or if the user is a non-EU region user, this order will be
            attempted to be routed to the exchange CLOB.
      title: Order entry configurations
    coinbase.public_api.authed.retail_brokerage_api.MovePortfolioFundsRequest:
      type: object
      properties:
        funds:
          description: The amount to be moved to the specified portfolio.
          allOf:
            - $ref: '#/components/schemas/coinbase.portfolio_service.Amount'
        source_portfolio_uuid:
          type: string
          example: 8bfc20d7-f7c6-4422-bf07-8243ca4169fe
          description: The UUID of the portfolio to send funds from.
        target_portfolio_uuid:
          type: string
          example: 8bfc20d7-f7c6-4422-bf07-8243ca4169fe
          description: The UUID of the portfolio to send funds to.
    coinbase.public_api.authed.retail_brokerage_api.MovePortfolioFundsResponse:
      type: object
      properties:
        source_portfolio_uuid:
          type: string
          example: 8bfc20d7-f7c6-4422-bf07-8243ca4169fe
          description: The UUID of the portfolio to send funds from.
        target_portfolio_uuid:
          type: string
          example: 8bfc20d7-f7c6-4422-bf07-8243ca4169fe
          description: The UUID of the portfolio to send funds to.
    coinbase.public_api.authed.retail_brokerage_api.NbboData:
      type: object
      properties:
        bid_price:
          type: string
        bid_size:
          type: string
        bid_market_center:
          type: string
        ask_price:
          type: string
        ask_size:
          type: string
        ask_market_center:
          type: string
        timestamp:
          type: string
        is_sip:
          type: boolean
      title: National best bid/offer data
    coinbase.public_api.authed.retail_brokerage_api.NewOrderErrorResponse:
      type: object
      properties:
        error:
          description: '**(Deprecated)**  The reason the order failed to be created'
          allOf:
            - $ref: >-
                #/components/schemas/coinbase.public_api.authed.retail_brokerage_api.NewOrderFailureReason
        message:
          type: string
          example: The order configuration was invalid
          description: Generic error message explaining why the order was not created
        error_details:
          type: string
          example: Market orders cannot be placed with empty order sizes
          description: Descriptive error message explaining why the order was not created
        preview_failure_reason:
          description: '**(Deprecated)**  The reason the order failed to be created'
          allOf:
            - $ref: >-
                #/components/schemas/coinbase.public_api.authed.retail_brokerage_api.PreviewFailureReason
        new_order_failure_reason:
          description: The reason the order failed to be created
          required:
            - new_order_failure_reason
          allOf:
            - $ref: >-
                #/components/schemas/coinbase.public_api.authed.retail_brokerage_api.NewOrderFailureReason
    coinbase.public_api.authed.retail_brokerage_api.NewOrderFailureReason:
      type: string
      enum:
        - UNKNOWN_FAILURE_REASON
        - UNSUPPORTED_ORDER_CONFIGURATION
        - INVALID_SIDE
        - INVALID_PRODUCT_ID
        - INVALID_SIZE_PRECISION
        - INVALID_PRICE_PRECISION
        - INSUFFICIENT_FUND
        - INVALID_LEDGER_BALANCE
        - ORDER_ENTRY_DISABLED
        - INELIGIBLE_PAIR
        - INVALID_LIMIT_PRICE_POST_ONLY
        - INVALID_LIMIT_PRICE
        - INVALID_NO_LIQUIDITY
        - INVALID_REQUEST
        - COMMANDER_REJECTED_NEW_ORDER
        - INSUFFICIENT_FUNDS
        - IN_LIQUIDATION
        - INVALID_MARGIN_TYPE
        - INVALID_LEVERAGE
        - UNTRADABLE_PRODUCT
        - INVALID_FCM_TRADING_SESSION
        - GEOFENCING_RESTRICTION
        - QUOTE_SIZE_NOT_ALLOWED_FOR_BRACKET
        - INVALID_BRACKET_PRICES
        - MISSING_MARKET_TRADE_DATA
        - INVALID_BRACKET_LIMIT_PRICE
        - INVALID_BRACKET_STOP_TRIGGER_PRICE
        - BRACKET_LIMIT_PRICE_OUT_OF_BOUNDS
        - STOP_TRIGGER_PRICE_OUT_OF_BOUNDS
        - BRACKET_ORDER_NOT_SUPPORTED
        - FOK_DISABLED
        - FOK_ONLY_ALLOWED_ON_LIMIT_ORDERS
        - POST_ONLY_NOT_ALLOWED_WITH_FOK
        - UBO_HIGH_LEVERAGE_QUANTITY_BREACHED
        - END_TIME_TOO_FAR_IN_FUTURE
        - LIMIT_PRICE_TOO_FAR_FROM_MARKET
        - OPEN_BRACKET_ORDERS
        - FUTURES_AFTER_HOUR_INVALID_ORDER_TYPE
        - FUTURES_AFTER_HOUR_INVALID_TIME_IN_FORCE
        - INVALID_ATTACHED_TAKE_PROFIT_PRICE
        - INVALID_ATTACHED_STOP_LOSS_PRICE
        - INVALID_ATTACHED_TAKE_PROFIT_PRICE_PRECISION
        - INVALID_ATTACHED_STOP_LOSS_PRICE_PRECISION
        - INVALID_ATTACHED_TAKE_PROFIT_PRICE_OUT_OF_BOUNDS
        - INVALID_ATTACHED_STOP_LOSS_PRICE_OUT_OF_BOUNDS
        - >-
          INVALID_ATTACHED_TAKE_PROFIT_PRICE_EXCEEDS_MAX_DISTANCE_FROM_ORIGINATING_PRICE
        - INVALID_ATTACHED_TAKE_PROFIT_SIZE_BELOW_MIN
        - ATTACHED_ORDER_SIZE_MUST_BE_NIL
        - INVALID_SETTLEMENT_CURRENCY
        - DURATION_TOO_SMALL
        - INTX_FOK_ONLY_ALLOWED_ON_LIMIT_AND_MARKET_ORDERS
        - BUCKET_SIZE_SMALLER_THAN_QUOTE_MIN
        - BUCKET_SIZE_SMALLER_THAN_BASE_MIN
        - END_TIME_AFTER_CONTRACT_EXPIRATION
        - START_TIME_MUST_BE_SPECIFIED
        - ICEBERG_ORDERS_NOT_SUPPORTED
        - END_TIME_IS_IN_THE_PAST
        - GTD_ORDERS_MUST_HAVE_END_TIME
        - ATTACHED_ORDER_MUST_HAVE_POSITIVE_PRICES
        - INVALID_ORDER_SIDE_FOR_ATTACHED_TPSL
        - ATTACHED_ORDERS_ONLY_ALLOWED_ON_MARKET_LIMIT
        - INVALID_ORDER_TYPE_FOR_ATTACHED
        - PRICE_NOT_ALLOWED_FOR_MARKET_ORDERS
        - REDUCE_ONLY_NOT_ALLOWED_ON_VENUE
        - DURATION_TOO_LARGE
        - REDUCE_ONLY_NOT_ALLOWED_ON_SPOT_PRODUCTS
        - LIMIT_ORDER_PRICE_EXCEEDS_PRICE_BAND_ON_BUY
        - LIMIT_ORDER_PRICE_EXCEEDS_PRICE_BAND_ON_SELL
        - INVALID_ATTACHED_TAKE_PROFIT_PRICE_OUT_OF_BOUNDS_ON_AGGRESSIVE_ORDER
        - INVALID_ATTACHED_STOP_LOSS_PRICE_OUT_OF_BOUNDS_ON_AGGRESSIVE_ORDER
        - STOP_ALREADY_TRIGGERED
        - REPLACE_NOT_SUPPORTED
        - ORDER_IS_PENDING_CANCEL
        - POSITION_SIZE_INCREASE_REJECT
        - ASSET_BALANCE_INCREASE_REJECT
        - TOO_MANY_PENDING_REPLACES
        - INVALID_RFQ_BASE_SIZE_TOO_SMALL
        - INVALID_RFQ_BASE_SIZE_TOO_LARGE
        - INVALID_RFQ_QUOTE_SIZE_TOO_SMALL
        - INVALID_RFQ_QUOTE_SIZE_TOO_LARGE
        - INVALID_UNSUPPORTED_INSTRUMENT
        - REDUCE_ONLY_INCREASED_POSITION_SIZE
        - SCALED_PARAM_INFEASIBLE
        - SCALED_MIN_ORDER_VIOLATION
        - SCALED_MAX_ORDER_VIOLATION
        - POST_ONLY_NOT_ALLOWED_WITH_PEG
        - INVALID_PEG_OFFSET
        - INVALID_PEG_WIG_LEVEL
        - INVALID_PEG_VENUE_OPTIONS
        - PEG_INVALID_ORDER_TYPE
        - SINGLE_LEGGED_TPSL_NOT_ALLOWED
        - FRACTIONAL_ORDERS_NOT_ALLOWED_FOR_PRODUCT
        - QUOTE_ORDERS_NOT_ALLOWED_FOR_PRODUCT
        - NBBO_NOT_PROVIDED
        - INVALID_NBBO_BID_PRICE
        - INVALID_NBBO_ASK_PRICE
        - NOTIONAL_SIZE_BREACHES_FRACTIONAL_MINIMUM
        - MARKET_ORDERS_PROHIBITED_DURING_NON_CORE_SESSION
        - NOTIONAL_ORDERS_PROHIBITED_DURING_NON_CORE_SESSION
        - MAX_NOTIONAL_PER_ORDER_BREACHED_15C35_CHECK
        - MAX_SHARES_PER_ORDER_BREACHED_15C35_CHECK
        - INVALID_EQUITY_TRADING_SESSION
        - PRODUCT_TRADING_HALTED
        - TRADING_DISABLED
        - CANNOT_CLOSE_ZERO_POSITION
        - SCALED_PARAM_DISCREPANCY
        - STOP_LOSS_PRICE_TOO_LOW
        - ATTACHED_STOP_LOSS_PRICE_TOO_LOW
        - BREACHED_RISK_LIMIT
        - STOP_LOSS_PRICE_TOO_HIGH
        - ATTACHED_STOP_LOSS_PRICE_TOO_HIGH
        - TAKE_PROFIT_PRICE_TOO_HIGH
        - ATTACHED_TAKE_PROFIT_PRICE_TOO_HIGH
        - TAKE_PROFIT_PRICE_TOO_LOW
        - ATTACHED_TAKE_PROFIT_PRICE_TOO_LOW
        - MODIFY_POSITION_WORKFLOW_ALREADY_RUNNING
        - DUPLICATE_CLIENT_ORDER_ID
      default: UNKNOWN_FAILURE_REASON
    coinbase.public_api.authed.retail_brokerage_api.NewOrderRequest:
      type: object
      properties:
        client_order_id:
          type: string
          example: 0000-00000-000000
          description: >-
            A unique ID provided for the order (used for identification
            purposes). If the ID provided is not unique, the order will not be
            created and the order corresponding with that ID will be returned
            instead.
          required:
            - client_order_id
        product_id:
          type: string
          example: BTC-USD
          description: The trading pair (e.g. 'BTC-USD').
          required:
            - product_id
        side:
          description: The side of the market that the order is on (e.g. 'BUY', 'SELL').
          required:
            - side
          allOf:
            - $ref: >-
                #/components/schemas/coinbase.public_api.authed.retail_brokerage_api.OrderSide
        order_configuration:
          description: The configuration of the order (e.g. the order type, size, etc).
          required:
            - order_configuration
          allOf:
            - $ref: >-
                #/components/schemas/coinbase.public_api.authed.retail_brokerage_api.OrderConfiguration
        leverage:
          type: string
          example: '2.0'
          description: The amount of leverage for the order (default is 1.0).
        margin_type:
          description: Margin Type for this order (default is CROSS).
          allOf:
            - $ref: >-
                #/components/schemas/coinbase.public_api.authed.retail_brokerage_api.MarginType
        retail_portfolio_id:
          type: string
          example: 11111111-1111-1111-1111-111111111111
          description: >-
            **(Deprecated)** The ID of the portfolio to associate the order
            with. Only applicable for legacy keys. CDP keys will default to the
            key's permissioned portfolio.
        preview_id:
          type: string
          example: b40bbff9-17ce-4726-8b64-9de7ae57ad26
          description: >-
            Preview ID for this order, to associate this order with a preview
            request
        attached_order_configuration:
          description: >-
            The configuration of the attached order. Only TriggerBracketGtc is
            eligible. Size field must be omitted as the size of the attached
            order is the same as that of the parent order.
          allOf:
            - $ref: >-
                #/components/schemas/coinbase.public_api.authed.retail_brokerage_api.OrderConfiguration
        sor_preference:
          example: SOR_ENABLED
          description: >-
            Smart Order Routing preference for this order. UNSPECIFIED uses
            default behavior based on user settings.
          allOf:
            - $ref: >-
                #/components/schemas/coinbase.public_api.authed.retail_brokerage_api.SorPreference
        prediction_metadata:
          allOf:
            - $ref: >-
                #/components/schemas/coinbase.public_api.authed.retail_brokerage_api.PredictionRequestMetadata
        cost_basis_method:
          description: The cost basis method for the order
          allOf:
            - $ref: '#/components/schemas/coinbase.positions.CostBasisMethod'
      required:
        - client_order_id
        - product_id
        - side
        - order_configuration
    coinbase.public_api.authed.retail_brokerage_api.NewOrderResponse:
      type: object
      properties:
        success:
          type: boolean
          example: true
          description: Whether the order was created.
          required:
            - success
        success_response:
          allOf:
            - $ref: >-
                #/components/schemas/coinbase.public_api.authed.retail_brokerage_api.NewOrderSuccessResponse
        error_response:
          allOf:
            - $ref: >-
                #/components/schemas/coinbase.public_api.authed.retail_brokerage_api.NewOrderErrorResponse
        order_configuration:
          description: The configuration of the order (e.g. the order type, size, etc).
          allOf:
            - $ref: >-
                #/components/schemas/coinbase.public_api.authed.retail_brokerage_api.OrderConfiguration
      required:
        - success
    coinbase.public_api.authed.retail_brokerage_api.NewOrderSuccessResponse:
      type: object
      properties:
        order_id:
          type: string
          example: 11111-00000-000000
          description: The ID of the order.
          required:
            - order_id
        product_id:
          type: string
          example: BTC-USD
          description: The trading pair (e.g. 'BTC-USD').
        side:
          description: The side of the market that the order is on (e.g. 'BUY', 'SELL').
          allOf:
            - $ref: >-
                #/components/schemas/coinbase.public_api.authed.retail_brokerage_api.OrderSide
        client_order_id:
          type: string
          example: 0000-00000-000000
          description: >-
            The unique ID provided for the order (used for identification
            purposes).
      required:
        - order_id
    coinbase.public_api.authed.retail_brokerage_api.Order:
      type: object
      properties:
        order_id:
          type: string
          example: 0000-000000-000000
          description: The ID of the order.
          required:
            - order_id
        product_id:
          type: string
          example: BTC-USD
          description: The trading pair (e.g. 'BTC-USD').
          required:
            - product_id
        user_id:
          type: string
          example: 2222-000000-000000
          description: The id of the User owning this Order
          required:
            - user_id
        order_configuration:
          description: The configuration of the order (e.g. the order type, size, etc).
          required:
            - order_configuration
          allOf:
            - $ref: >-
                #/components/schemas/coinbase.public_api.authed.retail_brokerage_api.OrderConfiguration
        side:
          description: The side of the market that the order is on (e.g. 'BUY', 'SELL').
          required:
            - side
          allOf:
            - $ref: >-
                #/components/schemas/coinbase.public_api.authed.retail_brokerage_api.OrderSide
        client_order_id:
          type: string
          example: 11111-000000-000000
          description: >-
            The unique ID provided for the order (used for identification
            purposes).
          required:
            - client_order_id
        status:
          description: The current state of the order
          required:
            - status
          allOf:
            - $ref: >-
                #/components/schemas/coinbase.public_api.authed.retail_brokerage_api.OrderExecutionStatus
        time_in_force:
          description: The client specified window for which the order can remain active
          allOf:
            - $ref: >-
                #/components/schemas/coinbase.public_api.authed.retail_brokerage_api.TimeInForceType
        created_time:
          type: string
          format: RFC3339 Timestamp
          example: 2021-05-31T09:59:59.000Z
          description: Timestamp for when the order was created
          required:
            - created_time
        completion_percentage:
          type: string
          example: '50'
          description: The percent of total order amount that has been filled
          required:
            - completion_percentage
        filled_size:
          type: string
          example: '0.001'
          description: >-
            The portion (in base currency) of total order amount that has been
            filled
        average_filled_price:
          type: string
          example: '50'
          description: The average of all prices of fills for this order
          required:
            - average_filled_price
        fee:
          type: string
          description: '**(Deprecated)**  Commission amount'
        number_of_fills:
          type: string
          example: '2'
          description: Number of fills that have been posted for this order
          required:
            - number_of_fills
        filled_value:
          type: string
          example: '10000'
          description: >-
            The portion (in quote current) of total order amount that has been
            filled
        pending_cancel:
          type: boolean
          example: true
          description: >-
            Whether a cancel request has been initiated for the order, and not
            yet completed
          required:
            - pending_cancel
        size_in_quote:
          type: boolean
          example: false
          description: Whether the order was placed with quote currency
          required:
            - size_in_quote
        total_fees:
          type: string
          example: '5.00'
          description: The total fees for the order
          required:
            - total_fees
        size_inclusive_of_fees:
          type: boolean
          example: false
          description: Whether the order size includes fees
          required:
            - size_inclusive_of_fees
        total_value_after_fees:
          type: string
          description: >-
            derived field: filled_value + total_fees for buy orders and
            filled_value - total_fees for sell orders.
          required:
            - total_value_after_fees
        trigger_status:
          description: The trigger status of the order, with respect to stop price.
          allOf:
            - $ref: >-
                #/components/schemas/coinbase.public_api.authed.retail_brokerage_api.StopTriggerStatus
        order_type:
          description: Type of the order
          allOf:
            - $ref: >-
                #/components/schemas/coinbase.public_api.authed.retail_brokerage_api.OrderType
        reject_reason:
          description: Reason the order was rejected.
          allOf:
            - $ref: >-
                #/components/schemas/coinbase.public_api.authed.retail_brokerage_api.RejectReason
        settled:
          type: boolean
          description: True if the order is fully filled, false otherwise.
        product_type:
          description: The type of order, i.e. Spot or Future
          allOf:
            - $ref: >-
                #/components/schemas/coinbase.public_api.authed.retail_brokerage_api.ProductType
        reject_message:
          type: string
          description: Message stating why the order was rejected.
        cancel_message:
          type: string
          description: Message stating why the order was canceled.
        order_placement_source:
          description: Message stating which source an order was placed from.
          allOf:
            - $ref: >-
                #/components/schemas/coinbase.public_api.authed.retail_brokerage_api.OrderPlacementSource
        outstanding_hold_amount:
          type: string
          description: >-
            The remaining hold amount (holdAmount - holdAmountReleased). [value
            is 0 if holdReleased is true]
        is_liquidation:
          type: boolean
          description: True if order is of liquidation type.
        last_fill_time:
          type: string
          format: RFC3339 Timestamp
          description: Time of the most recent fill for this order
        edit_history:
          type: array
          items:
            $ref: >-
              #/components/schemas/coinbase.public_api.authed.retail_brokerage_api.Edit
          description: An array of the latest 5 edits per order
        leverage:
          type: string
          description: The amount of leverage for the order (default is 1.0).
        margin_type:
          description: Margin Type for this order (default is CROSS).
          allOf:
            - $ref: >-
                #/components/schemas/coinbase.public_api.authed.retail_brokerage_api.MarginType
        retail_portfolio_id:
          type: string
          example: b87a2d3f-8a1e-49b3-a4ea-402d8c389aca
          description: The ID of the portfolio this order is associated with.
        originating_order_id:
          type: string
          example: b87a2d3f-8a1e-49b3-a4ea-402d8c389aca
          description: The ID of the parent order of an attached order.
        attached_order_id:
          type: string
          example: b87a2d3f-8a1e-49b3-a4ea-402d8c389aca
          description: The ID of the attached order of a parent order.
        attached_order_configuration:
          description: >-
            The configuration of the attached order. Only TriggerBracketGtc is
            eligible. Size field must be omitted as the size of the attached
            order is the same as that of the originating or parent order.
          allOf:
            - $ref: >-
                #/components/schemas/coinbase.public_api.authed.retail_brokerage_api.OrderConfiguration
        current_pending_replace:
          description: Price/Size of the current edit
          allOf:
            - $ref: >-
                #/components/schemas/coinbase.public_api.authed.retail_brokerage_api.Edit
        commission_detail_total:
          description: Breakdown of commission charges for the order
          allOf:
            - $ref: >-
                #/components/schemas/coinbase.public_api.authed.retail_brokerage_api.CommissionDetailTotal
        workable_size:
          type: string
          example: '3'
          description: The size of order in the originating order which is filled.
        workable_size_completion_pct:
          type: string
          example: '50'
          description: Percentage of the originating order which is filled
        product_details:
          description: Product-specific details, the oneof corresponds to the ProductType
          allOf:
            - $ref: >-
                #/components/schemas/coinbase.public_api.authed.retail_brokerage_api.ProductDetails
        cost_basis_method:
          description: The cost basis method for the order
          allOf:
            - $ref: '#/components/schemas/coinbase.positions.CostBasisMethod'
        displayed_order_config:
          description: >-
            Indicates how an order configuration is displayed to the user by the
            front end
          allOf:
            - $ref: >-
                #/components/schemas/coinbase.public_api.authed.retail_brokerage_api.DisplayedOrderConfig
        equity_trading_session:
          description: Trading session for equity orders
          allOf:
            - $ref: >-
                #/components/schemas/coinbase.public_api.authed.retail_brokerage_api.EquityTradingSession
        prediction_side:
          description: Direction of the prediction market order (YES or NO)
          allOf:
            - $ref: >-
                #/components/schemas/coinbase.public_api.authed.retail_brokerage_api.PredictionSide
        last_update_time:
          type: string
          format: RFC3339 Timestamp
          description: >-
            Time of the latest update to this order. It is defined as the time
            of the most recent fill if the order has any fills. Else this
            timestamp will be the order creation time.
      required:
        - order_id
        - product_id
        - side
        - created_time
        - status
        - user_id
        - order_configuration
        - client_order_id
        - completion_percentage
        - average_filled_price
        - number_of_fills
        - pending_cancel
        - size_in_quote
        - total_fees
        - size_inclusive_of_fees
        - total_value_after_fees
    coinbase.public_api.authed.retail_brokerage_api.OrderConfiguration:
      type: object
      properties:
        market_market_ioc:
          description: >-
            Buy or sell a specified quantity of an Asset at the current best
            available market price. [Read more on Market
            Orders](https://help.coinbase.com/en/coinbase/trading-and-funding/advanced-trade/order-types#market-order) 
          allOf:
            - $ref: >-
                #/components/schemas/coinbase.public_api.authed.retail_brokerage_api.MarketMarketIoc
        market_market_fok:
          description: >-
            Buy or sell a specified quantity of an Asset at the current best
            available market price. The Order will only post to the Order Book
            if it is to immediately and completely Fill. [Read more on Market
            Orders](https://help.coinbase.com/en/coinbase/trading-and-funding/advanced-trade/order-types#market-order)
          allOf:
            - $ref: >-
                #/components/schemas/coinbase.public_api.authed.retail_brokerage_api.MarketMarketFok
        sor_limit_ioc:
          description: >-
            Buy or sell a specified quantity of an Asset at a specified price.
            The Order will only post to the Order Book if it will immediately
            Fill; any remaining quantity is canceled. [Read more on Limit
            Orders.](https://help.coinbase.com/en/coinbase/trading-and-funding/advanced-trade/order-types#limit-order)
          allOf:
            - $ref: >-
                #/components/schemas/coinbase.public_api.authed.retail_brokerage_api.SorLimitIoc
        limit_limit_gtc:
          description: >-
            Buy or sell a specified quantity of an Asset at a specified price.
            If posted, the Order will remain on the Order Book until canceled.
            [Read more on Limit
            Orders.](https://help.coinbase.com/en/coinbase/trading-and-funding/advanced-trade/order-types#limit-order)
          allOf:
            - $ref: >-
                #/components/schemas/coinbase.public_api.authed.retail_brokerage_api.LimitLimitGtc
        limit_limit_gtd:
          description: >-
            Buy or sell a specified quantity of an Asset at a specified price.
            If posted, the Order will remain on the Order Book until a certain
            time is reached or the Order is canceled. [Read more on Limit
            Orders.](https://help.coinbase.com/en/coinbase/trading-and-funding/advanced-trade/order-types#limit-order)
          allOf:
            - $ref: >-
                #/components/schemas/coinbase.public_api.authed.retail_brokerage_api.LimitLimitGtd
        limit_limit_fok:
          description: >-
            Buy or sell a specified quantity of an Asset at a specified price.
            The Order will only post to the Order Book if it is to immediately
            and completely Fill. [Read more on Limit
            Orders.](https://help.coinbase.com/en/coinbase/trading-and-funding/advanced-trade/order-types#limit-order)
          allOf:
            - $ref: >-
                #/components/schemas/coinbase.public_api.authed.retail_brokerage_api.LimitLimitFok
        twap_limit_gtd:
          description: >-
            A time-weighted average price (TWAP) order type that calculates the
            average price of a product to programmatically execute an order over
            a specified duration.
          allOf:
            - $ref: >-
                #/components/schemas/coinbase.public_api.authed.retail_brokerage_api.TwapLimitGtd
        stop_limit_stop_limit_gtc:
          description: >-
            Posts an Order to buy or sell a specified quantity of an Asset, but
            only if and when the last trade price on the Order Book equals or
            surpasses the Stop Price. If posted, the Order will remain on the
            Order Book until canceled. [Read more on Stop-Limit
            Orders.](https://help.coinbase.com/en/coinbase/trading-and-funding/advanced-trade/order-types#stop-limit-order)
          allOf:
            - $ref: >-
                #/components/schemas/coinbase.public_api.authed.retail_brokerage_api.StopLimitStopLimitGtc
        stop_limit_stop_limit_gtd:
          description: >-
            Posts an Order to buy or sell a specified quantity of an Asset, but
            only if and when the last trade price on the Order Book equals or
            surpasses the Stop Price. If posted, the Order will remain on the
            Order Book until a certain time is reached or the Order.  [Read more
            on Stop-Limit
            Orders.](https://help.coinbase.com/en/coinbase/trading-and-funding/advanced-trade/order-types#stop-limit-order)
          allOf:
            - $ref: >-
                #/components/schemas/coinbase.public_api.authed.retail_brokerage_api.StopLimitStopLimitGtd
        trigger_bracket_gtc:
          description: >-
            A Limit Order to buy or sell a specified quantity of an Asset at a
            specified price, with stop limit order parameters embedded in the
            order. If posted, the Order will remain on the Order Book until
            canceled. [Read more on Bracket
            Orders.](https://help.coinbase.com/en/coinbase/trading-and-funding/advanced-trade/order-types#bracket-order)
          allOf:
            - $ref: >-
                #/components/schemas/coinbase.public_api.authed.retail_brokerage_api.TriggerBracketGtc
        trigger_bracket_gtd:
          description: >-
            A Limit Order to buy or sell a specified quantity of an Asset at a
            specified price, with stop limit order parameters embedded in the
            order. If posted, the Order will remain on the Order Book until a
            certain time is reached or the Order is canceled. [Read more on
            Bracket
            Orders.](https://help.coinbase.com/en/coinbase/trading-and-funding/advanced-trade/order-types#bracket-order)
          allOf:
            - $ref: >-
                #/components/schemas/coinbase.public_api.authed.retail_brokerage_api.TriggerBracketGtd
        scaled_limit_gtc:
          description: >-
            A scaled order enables users to divide a large order into multiple
            smaller limit orders, which are placed incrementally across a
            user-defined price range. [Read more on Limit
            Orders.](https://help.coinbase.com/en/coinbase/trading-and-funding/advanced-trade/order-types#limit-order)
          allOf:
            - $ref: >-
                #/components/schemas/coinbase.public_api.authed.retail_brokerage_api.ScaledLimitGtc
    coinbase.public_api.authed.retail_brokerage_api.OrderExecutionStatus:
      type: string
      enum:
        - PENDING
        - OPEN
        - FILLED
        - CANCELLED
        - EXPIRED
        - FAILED
        - UNKNOWN_ORDER_STATUS
        - QUEUED
        - CANCEL_QUEUED
        - EDIT_QUEUED
      default: PENDING
    coinbase.public_api.authed.retail_brokerage_api.OrderPlacementSource:
      type: string
      enum:
        - UNKNOWN_PLACEMENT_SOURCE
        - RETAIL_SIMPLE
        - RETAIL_ADVANCED
      default: UNKNOWN_PLACEMENT_SOURCE
      title: OrderPlacementSource reflects which source an order was placed from
    coinbase.public_api.authed.retail_brokerage_api.OrderPreviewRequest:
      type: object
      properties:
        product_id:
          type: string
          description: The trading pair (e.g. 'BTC-USD').
          required:
            - product_id
        side:
          description: The side of the market that the order is on (e.g. 'BUY', 'SELL').
          required:
            - side
          allOf:
            - $ref: >-
                #/components/schemas/coinbase.public_api.authed.retail_brokerage_api.OrderSide
        order_configuration:
          description: The configuration of the order (e.g. the order type, size, etc).
          required:
            - order_configuration
          allOf:
            - $ref: >-
                #/components/schemas/coinbase.public_api.authed.retail_brokerage_api.OrderConfiguration
        leverage:
          type: string
          example: '2.0'
          description: The amount of leverage for the order (default is 1.0).
        margin_type:
          description: Margin Type for this order (default is CROSS).
          allOf:
            - $ref: >-
                #/components/schemas/coinbase.public_api.authed.retail_brokerage_api.MarginType
        retail_portfolio_id:
          type: string
          example: 11111111-1111-1111-1111-111111111111
          description: >-
            **(Deprecated)** The ID of the portfolio to associate the order
            with. Only applicable for legacy keys. CDP keys will default to the
            key's permissioned portfolio.
        attached_order_configuration:
          description: >-
            The configuration of the attached order. Only TriggerBracketGtc is
            eligible. Size field must be omitted as the size of the attached
            order is the same as that of the parent order.
          allOf:
            - $ref: >-
                #/components/schemas/coinbase.public_api.authed.retail_brokerage_api.OrderConfiguration
        prediction_metadata:
          description: Request metadata specific to prediction market orders (YES/NO).
          allOf:
            - $ref: >-
                #/components/schemas/coinbase.public_api.authed.retail_brokerage_api.PredictionRequestMetadata
        cost_basis_method:
          description: The method used to calculate the cost basis for the order.
          allOf:
            - $ref: '#/components/schemas/coinbase.positions.CostBasisMethod'
      title: OrderPreview
      required:
        - product_id
        - side
        - commission_rate
        - order_configuration
    coinbase.public_api.authed.retail_brokerage_api.OrderPreviewResponse:
      type: object
      properties:
        order_total:
          type: string
          required:
            - order_total
        commission_total:
          type: string
          description: >-
            Currency amount of the applied commission (so not the rate that was
            used on input)
          required:
            - commission_total
        errs:
          type: array
          items:
            $ref: >-
              #/components/schemas/coinbase.public_api.authed.retail_brokerage_api.PreviewFailureReason
          description: List of potential failure reasons were this order to be submitted
          required:
            - errs
        warning:
          type: array
          items:
            $ref: >-
              #/components/schemas/coinbase.public_api.authed.retail_brokerage_api.PreviewWarningMsg
          required:
            - warning
        quote_size:
          type: string
          example: 10
          description: >-
            The amount of the second Asset in the Trading Pair. For example, on
            the BTC/USD Order Book, USD is the Quote Asset.
          required:
            - quote_size
        base_size:
          type: string
          example: 0.001
          description: >-
            The amount of the first Asset in the Trading Pair. For example, on
            the BTC-USD Order Book, BTC is the Base Asset.
          required:
            - base_size
        best_bid:
          type: string
          required:
            - best_bid
        best_ask:
          type: string
          required:
            - best_ask
        is_max:
          type: boolean
          description: >-
            Indicates whether tradable_balance should be set to the maximum
            amount.
          required:
            - is_max
        order_margin_total:
          type: string
        leverage:
          type: string
          example: '2.0'
          description: The amount of leverage for the order (default is 1.0).
        long_leverage:
          type: string
        short_leverage:
          type: string
        slippage:
          type: string
        preview_id:
          type: string
        current_liquidation_buffer:
          type: string
        projected_liquidation_buffer:
          type: string
        max_leverage:
          type: string
        pnl_configuration:
          description: >-
            Expected PNL of an order. This value is an estimate and does not
            take into account fees and slippage.
          allOf:
            - $ref: >-
                #/components/schemas/coinbase.public_api.authed.retail_brokerage_api.PnlConfiguration
        twap_bucket_metadata:
          allOf:
            - $ref: >-
                #/components/schemas/coinbase.public_api.authed.retail_brokerage_api.TwapBucketMetadata
        position_notional_limit:
          type: string
        max_notional_at_requested_leverage:
          type: string
        margin_ratio_data:
          allOf:
            - $ref: >-
                #/components/schemas/coinbase.public_api.authed.retail_brokerage_api.MarginRatioData
        commission_detail_total:
          description: Breakdown of commission charges for the order
          allOf:
            - $ref: >-
                #/components/schemas/coinbase.public_api.authed.retail_brokerage_api.CommissionDetailTotal
        scaled_metadata:
          description: Metadata for scaled orders containing the order distribution
          allOf:
            - $ref: >-
                #/components/schemas/coinbase.public_api.authed.retail_brokerage_api.ScaledOrderMetadata
        compliance_limit_data:
          description: Optional compliance limit data
          allOf:
            - $ref: >-
                #/components/schemas/coinbase.public_api.authed.retail_brokerage_api.ComplianceLimitData
        est_average_filled_price:
          type: string
          description: Estimated fill price for order.
        prediction_order_metadata:
          description: Metadata specific to prediction market orders.
          allOf:
            - $ref: >-
                #/components/schemas/coinbase.public_api.authed.retail_brokerage_api.PredictionOrderMetadata
        predicted_liquidation_price:
          type: string
          description: Predicted liquidation price for FCM orders.
      required:
        - order_total
        - commission_total
        - errs
        - warning
        - quote_size
        - base_size
        - best_bid
        - best_ask
        - is_max
    coinbase.public_api.authed.retail_brokerage_api.OrderSide:
      type: string
      enum:
        - BUY
        - SELL
      default: ''
    coinbase.public_api.authed.retail_brokerage_api.OrderType:
      type: string
      enum:
        - UNKNOWN_ORDER_TYPE
        - MARKET
        - LIMIT
        - STOP
        - STOP_LIMIT
        - BRACKET
        - TWAP
        - ROLL_OPEN
        - ROLL_CLOSE
        - LIQUIDATION
        - SCALED
      default: UNKNOWN_ORDER_TYPE
      title: >-
        - MARKET: A [market
        order](https://en.wikipedia.org/wiki/Order_(exchange)#Market_order)
         - LIMIT: A [limit order](https://en.wikipedia.org/wiki/Order_(exchange)#Limit_order)
         - STOP: A stop order is an order that becomes a market order when triggered
         - STOP_LIMIT: A stop order is a limit order that doesn't go on the book until it hits the stop price
         - BRACKET: A bracket order is a way to mitigate potential losses in volatile markets, consisting of a limit price leg and a stop trigger price.
         - TWAP: TWAP order is a way to split large buy/sell orders to smaller chunks to reduce market impact
         - ROLL_OPEN: ROLL_OPEN order is the open step order of a contract roll
         - ROLL_CLOSE: ROLL_CLOSE is the close step order in a contract roll
         - LIQUIDATION: LIQUIDATION is a special order type that is used to liquidate a position
         - SCALED: SCALED order is an order that is split into multiple child orders at incrementally increasing or decreasing prices
    coinbase.public_api.authed.retail_brokerage_api.PaginationMetadata:
      type: object
      properties:
        prev_cursor:
          type: string
        next_cursor:
          type: string
        has_next:
          type: boolean
        has_prev:
          type: boolean
      description: Pagination metadata for paginated responses.
    coinbase.public_api.authed.retail_brokerage_api.PerpetualProductDetails:
      type: object
      properties:
        open_interest:
          type: string
        funding_rate:
          type: string
        funding_time:
          type: string
          format: RFC3339 Timestamp
        max_leverage:
          type: string
        base_asset_uuid:
          type: string
        underlying_type:
          type: string
    coinbase.public_api.authed.retail_brokerage_api.PnlConfiguration:
      type: object
      properties:
        trigger_bracket_pnl:
          description: PNL configuration for a bracket order.
          allOf:
            - $ref: >-
                #/components/schemas/coinbase.public_api.authed.retail_brokerage_api.TriggerBracketPnl
    coinbase.public_api.authed.retail_brokerage_api.PredictionMarketProductDetails:
      type: object
      properties:
        contract_expiry:
          type: string
          format: RFC3339 Timestamp
        contract_code:
          type: string
        group_description:
          type: string
        group_short_description:
          type: string
        tradable_start_time:
          type: string
          format: RFC3339 Timestamp
        region_enabled:
          type: object
          additionalProperties:
            type: boolean
        venue:
          type: string
        sole_venue_product_id:
          type: string
        twenty_four_by_seven:
          type: boolean
        event_title:
          type: string
        event_subtitle:
          type: string
        series_ticker:
          type: string
        event_ticker:
          type: string
        market_ticker:
          type: string
        sector:
          type: string
        yes_subtitles:
          type: string
        rules_primary:
          type: string
        rules_secondary:
          type: string
        prohibitions:
          type: array
          items:
            type: string
        settlement_timestamp:
          type: string
          format: RFC3339 Timestamp
        settlement_price:
          type: string
        can_close_early:
          type: boolean
        early_close_condition:
          type: string
        settlement_timer_seconds:
          type: string
          format: int64
        scope:
          type: string
        settlement_sources:
          type: array
          items:
            $ref: >-
              #/components/schemas/coinbase.public_api.authed.retail_brokerage_api.SettlementSource
        tags:
          type: array
          items:
            type: string
        yes_titles:
          type: string
        is_marquee:
          type: boolean
        competition:
          type: string
        competition_scope:
          type: string
        light_mode_icon_url:
          type: string
        dark_mode_icon_url:
          type: string
        is_image_overwritten:
          type: boolean
        contract_terms_url:
          type: string
        frequency:
          type: string
        yesTitleShort:
          type: string
        noTitleShort:
          type: string
        market_color:
          type: string
        market_color_dark:
          type: string
        abbreviation:
          type: string
        subject_references:
          type: array
          items:
            $ref: >-
              #/components/schemas/coinbase.public_api.authed.retail_brokerage_api.SubjectReference
        important_information:
          type: string
        should_display_important_information:
          type: boolean
        floor_strike:
          type: string
        strike_type:
          type: string
        parent_event_ticker:
          type: string
      title: Prediction Market products specific market data
    coinbase.public_api.authed.retail_brokerage_api.PredictionOrderMetadata:
      type: object
      properties:
        contract_subtotal:
          type: string
          description: >-
            The base contract value from user's perspective, adjusted for
            prediction market direction.
        user_net_total:
          type: string
          description: >-
            The net amount user pays (for buys) or receives (for sells),
            accounting for prediction market direction and fees.
        slippage_percentage:
          type: string
          description: Slippage tolerance percentage based on price tier.
        minimum_contracts:
          type: string
          description: >-
            Minimum contracts the user will receive after slippage. Populated
            for BUY orders with quote_size.
        minimum_total:
          description: >-
            Minimum USD the user will receive after slippage. Populated for SELL
            orders with base_size.
          allOf:
            - $ref: >-
                #/components/schemas/coinbase.public_api.authed.retail_brokerage_api.Amount
        maximum_total:
          description: >-
            Maximum USD the user will pay after slippage. Populated for BUY
            orders with base_size.
          allOf:
            - $ref: >-
                #/components/schemas/coinbase.public_api.authed.retail_brokerage_api.Amount
        maximum_contracts:
          type: string
          description: >-
            Maximum contracts the user will sell after slippage. Populated for
            SELL orders with quote_size.
      title: Prediction market-specific metadata for the order preview response
    coinbase.public_api.authed.retail_brokerage_api.PredictionRequestMetadata:
      type: object
      properties:
        prediction_side:
          allOf:
            - $ref: >-
                #/components/schemas/coinbase.public_api.authed.retail_brokerage_api.PredictionSide
        preview_order_est_average_filled_price:
          type: string
        supports_fractional_base_size:
          type: boolean
      description: Request metadata specific to prediction market orders.
    coinbase.public_api.authed.retail_brokerage_api.PredictionSide:
      type: string
      enum:
        - PREDICTION_SIDE_UNKNOWN
        - PREDICTION_SIDE_YES
        - PREDICTION_SIDE_NO
      default: PREDICTION_SIDE_UNKNOWN
      description: >-
        Prediction market orders can be either a YES or NO.


        Under the hood, there is only a YES order book; NO orders are
        technically

        short positions on the YES order book.
    coinbase.public_api.authed.retail_brokerage_api.PreviewEditOrderResponse:
      type: object
      properties:
        errors:
          type: array
          items:
            $ref: >-
              #/components/schemas/coinbase.public_api.authed.retail_brokerage_api.EditOrderError
          required:
            - errors
        slippage:
          type: string
        order_total:
          type: string
        commission_total:
          type: string
        quote_size:
          type: string
          example: 10
          description: >-
            The amount of the second Asset in the Trading Pair. For example, on
            the BTC/USD Order Book, USD is the Quote Asset.
        base_size:
          type: string
          example: 0.001
          description: >-
            The amount of the first Asset in the Trading Pair. For example, on
            the BTC-USD Order Book, BTC is the Base Asset.
        best_bid:
          type: string
        best_ask:
          type: string
        average_filled_price:
          type: string
        order_margin_total:
          type: string
        commission_detail_total:
          description: Breakdown of commission charges for the order
          allOf:
            - $ref: >-
                #/components/schemas/coinbase.public_api.authed.retail_brokerage_api.CommissionDetailTotal
        pnl_configuration:
          description: >-
            Expected PNL of an order. This value is an estimate and does not
            take into account fees and slippage.
          allOf:
            - $ref: >-
                #/components/schemas/coinbase.public_api.authed.retail_brokerage_api.PnlConfiguration
      required:
        - errors
    coinbase.public_api.authed.retail_brokerage_api.PreviewFailureReason:
      type: string
      enum:
        - UNKNOWN_PREVIEW_FAILURE_REASON
        - PREVIEW_MISSING_COMMISSION_RATE
        - PREVIEW_INVALID_SIDE
        - PREVIEW_INVALID_ORDER_CONFIG
        - PREVIEW_INVALID_PRODUCT_ID
        - PREVIEW_INVALID_SIZE_PRECISION
        - PREVIEW_INVALID_PRICE_PRECISION
        - PREVIEW_MISSING_PRODUCT_PRICE_BOOK
        - PREVIEW_INVALID_LEDGER_BALANCE
        - PREVIEW_INSUFFICIENT_LEDGER_BALANCE
        - PREVIEW_INVALID_LIMIT_PRICE_POST_ONLY
        - PREVIEW_INVALID_LIMIT_PRICE
        - PREVIEW_INVALID_NO_LIQUIDITY
        - PREVIEW_INSUFFICIENT_FUND
        - PREVIEW_INVALID_COMMISSION_CONFIGURATION
        - PREVIEW_INVALID_STOP_PRICE
        - PREVIEW_INVALID_BASE_SIZE_TOO_LARGE
        - PREVIEW_INVALID_BASE_SIZE_TOO_SMALL
        - PREVIEW_INVALID_QUOTE_SIZE_PRECISION
        - PREVIEW_INVALID_QUOTE_SIZE_TOO_LARGE
        - PREVIEW_INVALID_PRICE_TOO_LARGE
        - PREVIEW_INVALID_QUOTE_SIZE_TOO_SMALL
        - PREVIEW_INSUFFICIENT_FUNDS_FOR_FUTURES
        - PREVIEW_BREACHED_PRICE_LIMIT
        - PREVIEW_BREACHED_ACCOUNT_POSITION_LIMIT
        - PREVIEW_BREACHED_COMPANY_POSITION_LIMIT
        - PREVIEW_INVALID_MARGIN_HEALTH
        - PREVIEW_RISK_PROXY_FAILURE
        - PREVIEW_UNTRADABLE_FCM_ACCOUNT_STATUS
        - PREVIEW_IN_LIQUIDATION
        - PREVIEW_INVALID_MARGIN_TYPE
        - PREVIEW_INVALID_LEVERAGE
        - PREVIEW_UNTRADABLE_PRODUCT
        - PREVIEW_INVALID_FCM_TRADING_SESSION
        - PREVIEW_NOT_ALLOWED_BY_MARKET_STATE
        - PREVIEW_BREACHED_OPEN_INTEREST_LIMIT
        - PREVIEW_GEOFENCING_RESTRICTION
        - PREVIEW_INVALID_END_TIME
        - PREVIEW_OPPOSITE_MARGIN_TYPE_EXISTS
        - PREVIEW_QUOTE_SIZE_NOT_ALLOWED_FOR_BRACKET
        - PREVIEW_INVALID_BRACKET_PRICES
        - PREVIEW_MISSING_MARKET_TRADE_DATA
        - PREVIEW_INVALID_BRACKET_LIMIT_PRICE
        - PREVIEW_INVALID_BRACKET_STOP_TRIGGER_PRICE
        - PREVIEW_BRACKET_LIMIT_PRICE_OUT_OF_BOUNDS
        - PREVIEW_STOP_TRIGGER_PRICE_OUT_OF_BOUNDS
        - PREVIEW_BRACKET_ORDER_NOT_SUPPORTED
        - PREVIEW_INVALID_STOP_PRICE_PRECISION
        - PREVIEW_STOP_PRICE_ABOVE_LIMIT_PRICE
        - PREVIEW_STOP_PRICE_BELOW_LIMIT_PRICE
        - PREVIEW_STOP_PRICE_ABOVE_LAST_TRADE_PRICE
        - PREVIEW_STOP_PRICE_BELOW_LAST_TRADE_PRICE
        - PREVIEW_FOK_DISABLED
        - PREVIEW_FOK_ONLY_ALLOWED_ON_LIMIT_ORDERS
        - PREVIEW_POST_ONLY_NOT_ALLOWED_WITH_FOK
        - PREVIEW_UBO_HIGH_LEVERAGE_QUANTITY_BREACHED
        - PREVIEW_ECOSYSTEM_LEVERAGE_UTILIZATION_BREACHED
        - PREVIEW_CLOSE_ONLY_FAILURE
        - PREVIEW_UBO_HIGH_LEVERAGE_NOTIONAL_BREACHED
        - PREVIEW_END_TIME_TOO_FAR_IN_FUTURE
        - PREVIEW_LIMIT_PRICE_TOO_FAR_FROM_MARKET
        - PREVIEW_FUTURES_AFTER_HOUR_INVALID_ORDER_TYPE
        - PREVIEW_FUTURES_AFTER_HOUR_INVALID_TIME_IN_FORCE
        - PREVIEW_INVALID_ATTACHED_TAKE_PROFIT_PRICE
        - PREVIEW_INVALID_ATTACHED_STOP_LOSS_PRICE
        - PREVIEW_INVALID_ATTACHED_TAKE_PROFIT_PRICE_PRECISION
        - PREVIEW_INVALID_ATTACHED_STOP_LOSS_PRICE_PRECISION
        - PREVIEW_INVALID_ATTACHED_TAKE_PROFIT_PRICE_OUT_OF_BOUNDS
        - PREVIEW_INVALID_ATTACHED_STOP_LOSS_PRICE_OUT_OF_BOUNDS
        - PREVIEW_INVALID_BRACKET_ORDER_SIDE
        - PREVIEW_BRACKET_ORDER_SIZE_EXCEEDS_POSITION
        - PREVIEW_ORDER_SIZE_EXCEEDS_BRACKETED_POSITION
        - PREVIEW_INVALID_LIMIT_PRICE_PRECISION
        - PREVIEW_INVALID_STOP_TRIGGER_PRICE_PRECISION
        - >-
          PREVIEW_INVALID_ATTACHED_TAKE_PROFIT_PRICE_EXCEEDS_MAX_DISTANCE_FROM_ORIGINATING_PRICE
        - PREVIEW_INVALID_ATTACHED_TAKE_PROFIT_SIZE_BELOW_MIN
        - PREVIEW_ATTACHED_ORDER_SIZE_MUST_BE_NIL
        - PREVIEW_BELOW_MIN_SIZE_FOR_DURATION
        - PREVIEW_MAX_DAILY_VOLUME_NOTIONAL_BREACHED
        - PREVIEW_INVALID_SETTLEMENT_CURRENCY
        - PREVIEW_DURATION_TOO_SMALL
        - PREVIEW_INTX_FOK_ONLY_ALLOWED_ON_LIMIT_AND_MARKET_ORDERS
        - PREVIEW_BUCKET_SIZE_SMALLER_THAN_QUOTE_MIN
        - PREVIEW_BUCKET_SIZE_SMALLER_THAN_BASE_MIN
        - PREVIEW_END_TIME_AFTER_CONTRACT_EXPIRATION
        - PREVIEW_START_TIME_MUST_BE_SPECIFIED
        - PREVIEW_ICEBERG_ORDERS_NOT_SUPPORTED
        - PREVIEW_END_TIME_IS_IN_THE_PAST
        - PREVIEW_GTD_ORDERS_MUST_HAVE_END_TIME
        - PREVIEW_ATTACHED_ORDER_MUST_HAVE_POSITIVE_PRICES
        - PREVIEW_INVALID_ORDER_SIDE_FOR_ATTACHED_TPSL
        - PREVIEW_ATTACHED_ORDERS_ONLY_ALLOWED_ON_MARKET_LIMIT
        - PREVIEW_INVALID_ORDER_TYPE_FOR_ATTACHED
        - PREVIEW_PRICE_NOT_ALLOWED_FOR_MARKET_ORDERS
        - PREVIEW_REDUCE_ONLY_NOT_ALLOWED_ON_VENUE
        - PREVIEW_NON_NUMERIC_ORDER_SIZE
        - PREVIEW_INVALID_INTX_CLIENT_ORDER_ID
        - PREVIEW_DURATION_TOO_LARGE
        - PREVIEW_REDUCE_ONLY_NOT_ALLOWED_ON_SPOT_PRODUCTS
        - PREVIEW_LIMIT_ORDER_PRICE_EXCEEDS_PRICE_BAND_ON_BUY
        - PREVIEW_LIMIT_ORDER_PRICE_EXCEEDS_PRICE_BAND_ON_SELL
        - >-
          PREVIEW_INVALID_ATTACHED_TAKE_PROFIT_PRICE_OUT_OF_BOUNDS_ON_AGGRESSIVE_ORDER
        - >-
          PREVIEW_INVALID_ATTACHED_STOP_LOSS_PRICE_OUT_OF_BOUNDS_ON_AGGRESSIVE_ORDER
        - PREVIEW_STOP_TRIGGERED
        - PREVIEW_REPLACE_NOT_SUPPORTED
        - PREVIEW_ORDER_IS_PENDING_CANCEL
        - PREVIEW_POSITION_SIZE_INCREASE_REJECT
        - PREVIEW_ASSET_BALANCE_INCREASE_REJECT
        - PREVIEW_TOO_MANY_PENDING_REPLACES
        - PREVIEW_INVALID_RFQ_BASE_SIZE_TOO_SMALL
        - PREVIEW_INVALID_RFQ_BASE_SIZE_TOO_LARGE
        - PREVIEW_INVALID_RFQ_QUOTE_SIZE_TOO_SMALL
        - PREVIEW_INVALID_RFQ_QUOTE_SIZE_TOO_LARGE
        - PREVIEW_REDUCE_ONLY_INCREASED_POSITION_SIZE
        - PREVIEW_COMPLIANCE_PURCHASE_LIMIT_EXCEEDED
        - PREVIEW_SCALED_PARAM_INFEASIBLE
        - PREVIEW_SCALED_MIN_ORDER_VIOLATION
        - PREVIEW_SCALED_MAX_ORDER_VIOLATION
        - PREVIEW_POST_ONLY_NOT_ALLOWED_WITH_PEG
        - PREVIEW_INVALID_PEG_OFFSET
        - PREVIEW_INVALID_PEG_WIG_LEVEL
        - PREVIEW_INVALID_PEG_VENUE_OPTIONS
        - PREVIEW_PEG_INVALID_ORDER_TYPE
        - PREVIEW_SINGLE_LEGGED_TPSL_NOT_ALLOWED
        - PREVIEW_FRACTIONAL_ORDERS_NOT_ALLOWED_FOR_PRODUCT
        - PREVIEW_QUOTE_ORDERS_NOT_ALLOWED_FOR_PRODUCT
        - PREVIEW_NBBO_NOT_PROVIDED
        - PREVIEW_INVALID_NBBO_BID_PRICE
        - PREVIEW_INVALID_NBBO_ASK_PRICE
        - PREVIEW_NOTIONAL_SIZE_BREACHES_FRACTIONAL_MINIMUM
        - PREVIEW_MARKET_ORDERS_PROHIBITED_DURING_NON_CORE_SESSION
        - PREVIEW_NOTIONAL_ORDERS_PROHIBITED_DURING_NON_CORE_SESSION
        - PREVIEW_MAX_NOTIONAL_PER_ORDER_BREACHED_15C35_CHECK
        - PREVIEW_MAX_SHARES_PER_ORDER_BREACHED_15C35_CHECK
        - PREVIEW_INVALID_EQUITY_TRADING_SESSION
        - PREVIEW_PRODUCT_TRADING_HALTED
        - PREVIEW_TRADING_DISABLED
        - PREVIEW_INVALID_BRACKET_LIMIT_PRICE_PRECISION
        - PREVIEW_SCALED_PARAM_DISCREPANCY
        - PREVIEW_STOP_LOSS_PRICE_TOO_LOW
        - PREVIEW_PREDICTIONS_QUOTE_SIZE_BELOW_MIN_CONTRACT_PRICE
        - PREVIEW_PREDICTIONS_HIGH_PRICE_CONTRACTS_BLOCKED
        - PREVIEW_ATTACHED_STOP_LOSS_PRICE_TOO_LOW
        - PREVIEW_BREACHED_RISK_LIMIT
        - PREVIEW_STOP_LOSS_PRICE_TOO_HIGH
        - PREVIEW_ATTACHED_STOP_LOSS_PRICE_TOO_HIGH
        - PREVIEW_TAKE_PROFIT_PRICE_TOO_HIGH
        - PREVIEW_ATTACHED_TAKE_PROFIT_PRICE_TOO_HIGH
        - PREVIEW_TAKE_PROFIT_PRICE_TOO_LOW
        - PREVIEW_ATTACHED_TAKE_PROFIT_PRICE_TOO_LOW
      default: UNKNOWN_PREVIEW_FAILURE_REASON
    coinbase.public_api.authed.retail_brokerage_api.PreviewWarningMsg:
      type: string
      enum:
        - UNKNOWN
        - BIG_ORDER
        - SMALL_ORDER
        - DURATION_EXTENDED_BY_MARKET_CLOSE
        - OPEN_ORDERS_EXCEED_COMPLIANCE_PURCHASE_LIMIT_MAY_CANCEL
      default: UNKNOWN
    coinbase.public_api.authed.retail_brokerage_api.PriceBook:
      type: object
      properties:
        product_id:
          type: string
          example: BTC-USD
          description: The trading pair (e.g. 'BTC-USD').
          required:
            - product_id
        bids:
          type: array
          items:
            $ref: >-
              #/components/schemas/coinbase.public_api.authed.retail_brokerage_api.L2Level
          required:
            - bids
        asks:
          type: array
          items:
            $ref: >-
              #/components/schemas/coinbase.public_api.authed.retail_brokerage_api.L2Level
          required:
            - asks
        time:
          type: string
          format: RFC3339 Timestamp
      required:
        - product_id
        - bids
        - asks
    coinbase.public_api.authed.retail_brokerage_api.Product:
      type: object
      properties:
        product_id:
          type: string
          example: BTC-USD
          description: The trading pair (e.g. 'BTC-USD').
          required:
            - product_id
        price:
          type: string
          example: '140.21'
          description: The current price for the product, in quote currency.
          required:
            - price
        price_percentage_change_24h:
          type: string
          example: 9.43%
          description: >-
            The amount the price of the product has changed, in percent, in the
            last 24 hours.
          required:
            - price_percentage_change_24h
        volume_24h:
          type: string
          example: '1908432'
          description: The trading volume for the product in the last 24 hours.
          required:
            - volume_24h
        volume_percentage_change_24h:
          type: string
          example: 9.43%
          description: >-
            The amount the volume of the product has changed, in percent, in the
            last 24 hours.
          required:
            - volume_percentage_change_24h
        base_increment:
          type: string
          example: '0.00000001'
          description: Minimum amount base value can be increased or decreased at once.
          required:
            - base_increment
        quote_increment:
          type: string
          example: '0.00000001'
          description: Minimum amount quote value can be increased or decreased at once.
          required:
            - quote_increment
        quote_min_size:
          type: string
          example: '0.00000001'
          description: Minimum size that can be represented of quote currency.
          required:
            - quote_min_size
        quote_max_size:
          type: string
          example: '1000'
          description: Maximum size that can be represented of quote currency.
          required:
            - quote_max_size
        base_min_size:
          type: string
          example: '0.00000001'
          description: Minimum size that can be represented of base currency.
          required:
            - base_min_size
        base_max_size:
          type: string
          example: '1000'
          description: Maximum size that can be represented of base currency.
          required:
            - base_max_size
        base_name:
          type: string
          example: Bitcoin
          description: Name of the base currency.
          required:
            - base_name
        quote_name:
          type: string
          example: US Dollar
          description: Name of the quote currency.
          required:
            - quote_name
        watched:
          type: boolean
          example: true
          description: Whether or not the product is on the user's watchlist.
          required:
            - watched
        is_disabled:
          type: boolean
          example: false
          description: Whether or not the product is disabled for trading.
          required:
            - is_disabled
        new:
          type: boolean
          example: true
          description: Whether or not the product is 'new'.
          required:
            - new
        status:
          type: string
          description: Status of the product.
          required:
            - status
        cancel_only:
          type: boolean
          example: true
          description: >-
            Whether or not orders of the product can only be cancelled, not
            placed or edited.
          required:
            - cancel_only
        limit_only:
          type: boolean
          example: true
          description: >-
            Whether or not orders of the product can only be limit orders, not
            market orders.
          required:
            - limit_only
        post_only:
          type: boolean
          example: true
          description: >-
            Whether or not orders of the product can only be posted, not
            cancelled.
          required:
            - post_only
        trading_disabled:
          type: boolean
          example: false
          description: >-
            Whether or not the product is disabled for trading for all market
            participants.
          required:
            - trading_disabled
        auction_mode:
          type: boolean
          example: true
          description: Whether or not the product is in auction mode.
          required:
            - auction_mode
        product_type:
          description: Type of the product.
          allOf:
            - $ref: >-
                #/components/schemas/coinbase.public_api.authed.retail_brokerage_api.ProductType
        quote_currency_id:
          type: string
          example: USD
          description: Symbol of the quote currency.
        base_currency_id:
          type: string
          example: BTC
          description: Symbol of the base currency.
        fcm_trading_session_details:
          allOf:
            - $ref: >-
                #/components/schemas/coinbase.public_api.authed.retail_brokerage_api.FcmTradingSessionDetails
        mid_market_price:
          type: string
          example: '140.22'
          description: The current midpoint of the bid-ask spread, in quote currency.
        alias:
          type: string
          example: BTC-USD
          description: Product id for the corresponding unified book.
        alias_to:
          type: array
          example:
            - BTC-USDC
          items:
            type: string
          description: Product ids that this product serves as an alias for.
        base_display_symbol:
          type: string
          example: BTC
          description: Symbol of the base display currency.
          required:
            - base_display_symbol
        quote_display_symbol:
          type: string
          example: USD
          description: Symbol of the quote display currency.
          required:
            - quote_display_symbol
        view_only:
          type: boolean
          example: true
          description: >-
            Reflects whether an FCM product has expired. For SPOT, set
            get_tradability_status to get a return value here. Defaulted to
            false for all other product types.
        price_increment:
          type: string
          example: '0.00000001'
          description: Minimum amount price can be increased or decreased at once.
        display_name:
          type: string
          example: BTC PERP
          description: Display name for the product e.g. BTC-PERP-INTX => BTC PERP
        product_venue:
          example: neptune
          description: >-
            The sole venue id for the product. Defaults to CBE if the product is
            not specific to a single venue
          allOf:
            - $ref: >-
                #/components/schemas/coinbase.public_api.authed.retail_brokerage_api.ProductVenue
        approximate_quote_24h_volume:
          type: string
          example: '1908432'
          description: >-
            The approximate trading volume for the product in the last 24 hours
            based on the current quote.
        new_at:
          type: string
          format: RFC3339 Timestamp
          example: 2021-07-01T00:00:00.000Z
          description: >-
            The timestamp when the product was listed. This is only populated if
            product has new tag.
        market_cap:
          type: string
          example: '1500000000000'
          description: The market capitalization of the product's base asset.
        icon_color:
          type: string
          example: red
          description: color for icon display
        icon_url:
          type: string
          example: https://metadata.cbhq.net/equity_icons/123456789.png
          description: A URL to the icon image.
        display_name_overwrite:
          type: string
          example: Bitcoin Perpetual
          description: An alternative name to display for the product.
        is_alpha_testing:
          type: boolean
          example: false
          description: flag for alpha user testing
        about_description:
          type: string
          example: >-
            nano Crude Oil Futures is a monthly cash-settled contract that
            allows participants to manage risk, trade on margin, or speculate on
            the price of oil.
          description: description used in about section for an asset
        best_bid_price:
          type: string
        best_ask_price:
          type: string
        future_product_details:
          allOf:
            - $ref: >-
                #/components/schemas/coinbase.public_api.authed.retail_brokerage_api.FutureProductDetails
      title: Get Products
      required:
        - product_id
        - price
        - volume_24h
        - price_percentage_change_24h
        - volume_percentage_change_24h
        - base_increment
        - quote_increment
        - quote_min_size
        - quote_max_size
        - base_min_size
        - base_max_size
        - base_name
        - quote_name
        - watched
        - is_disabled
        - new
        - status
        - cancel_only
        - limit_only
        - post_only
        - trading_disabled
        - auction_mode
        - base_display_symbol
        - quote_display_symbol
    coinbase.public_api.authed.retail_brokerage_api.ProductDetails:
      type: object
      properties:
        equity_details:
          allOf:
            - $ref: >-
                #/components/schemas/coinbase.public_api.authed.retail_brokerage_api.EquityOrderProductDetails
      title: |-
        Product details, where the oneof corresponds to the ProductType
        Currently skipping FutureProductDetails as it's not used
    coinbase.public_api.authed.retail_brokerage_api.ProductFilter:
      type: object
      properties:
        product_type:
          allOf:
            - $ref: >-
                #/components/schemas/coinbase.public_api.authed.retail_brokerage_api.ProductTypeFilter
        contract_expiry_type:
          allOf:
            - $ref: >-
                #/components/schemas/coinbase.public_api.authed.retail_brokerage_api.ContractExpiryTypeFilter
        expiring_contract_status:
          allOf:
            - $ref: >-
                #/components/schemas/coinbase.public_api.authed.retail_brokerage_api.ExpiringContractStatusFilter
        tradable_status:
          allOf:
            - $ref: >-
                #/components/schemas/coinbase.public_api.authed.retail_brokerage_api.TradableStatusFilter
        product_venue:
          allOf:
            - $ref: >-
                #/components/schemas/coinbase.public_api.authed.retail_brokerage_api.ProductVenueFilter
        equity_product_subtype:
          allOf:
            - $ref: >-
                #/components/schemas/coinbase.public_api.authed.retail_brokerage_api.EquityProductSubtypeFilter
        equity_product_subtypes:
          allOf:
            - $ref: >-
                #/components/schemas/coinbase.public_api.authed.retail_brokerage_api.EquityProductSubtypesFilter
        quote_currency:
          allOf:
            - $ref: >-
                #/components/schemas/coinbase.public_api.authed.retail_brokerage_api.QuoteCurrencyFilter
        futures_asset_type:
          allOf:
            - $ref: >-
                #/components/schemas/coinbase.public_api.authed.retail_brokerage_api.FuturesAssetTypeFilter
        futures_asset_types:
          allOf:
            - $ref: >-
                #/components/schemas/coinbase.public_api.authed.retail_brokerage_api.FuturesAssetTypesFilter
      title: All available filters for products
    coinbase.public_api.authed.retail_brokerage_api.ProductType:
      type: string
      enum:
        - UNKNOWN_PRODUCT_TYPE
        - SPOT
        - FUTURE
      default: UNKNOWN_PRODUCT_TYPE
      description: Defines the type of a product.
    coinbase.public_api.authed.retail_brokerage_api.ProductTypeFilter:
      type: object
      properties:
        value:
          allOf:
            - $ref: >-
                #/components/schemas/coinbase.public_api.authed.retail_brokerage_api.ProductType
      title: Filter for product type
    coinbase.public_api.authed.retail_brokerage_api.ProductVenue:
      type: string
      enum:
        - UNKNOWN_VENUE_TYPE
        - CBE
        - FCM
        - INTX
      default: UNKNOWN_VENUE_TYPE
      description: Defines the venue of a product.
    coinbase.public_api.authed.retail_brokerage_api.ProductVenueFilter:
      type: object
      properties:
        value:
          allOf:
            - $ref: >-
                #/components/schemas/coinbase.public_api.authed.retail_brokerage_api.ProductVenue
      title: Filter for product venue
    coinbase.public_api.authed.retail_brokerage_api.Products:
      type: object
      properties:
        products:
          type: array
          items:
            $ref: >-
              #/components/schemas/coinbase.public_api.authed.retail_brokerage_api.Product
          description: Array of objects, each representing one product.
        num_products:
          type: integer
          format: int32
          example: 100
          description: Number of products that were returned.
        pagination:
          allOf:
            - $ref: >-
                #/components/schemas/coinbase.public_api.authed.retail_brokerage_api.PaginationMetadata
    coinbase.public_api.authed.retail_brokerage_api.ProductsSortOption:
      type: string
      enum:
        - SORT_OPTION_UNSPECIFIED
        - SORT_OPTION_ID
        - SORT_OPTION_MARKET_CAP
        - SORT_OPTION_VOLUME_24H
        - SORT_OPTION_PRICE
        - SORT_OPTION_VOLUME_PERCENT_CHANGE_24H
        - SORT_OPTION_PRICE_PERCENT_CHANGE_24H
        - SORT_OPTION_NEW_AT
        - SORT_OPTION_COMPETITIVENESS
        - SORT_OPTION_APPROXIMATE_QUOTE_24H_VOLUME
        - SORT_OPTION_TICKER
      default: SORT_OPTION_UNSPECIFIED
      description: Sort options for products paginated responses.
    coinbase.public_api.authed.retail_brokerage_api.ProductsSortOrder:
      type: string
      enum:
        - PRODUCTS_SORT_ORDER_UNDEFINED
        - PRODUCTS_SORT_ORDER_VOLUME_24H_DESCENDING
        - PRODUCTS_SORT_ORDER_LIST_TIME_DESCENDING
      default: PRODUCTS_SORT_ORDER_UNDEFINED
      description: Defines the sort order for products.
    coinbase.public_api.authed.retail_brokerage_api.QuoteCurrencyFilter:
      type: object
      properties:
        value:
          type: string
      title: Filter for quote currency (QuoteCurrencyId)
    coinbase.public_api.authed.retail_brokerage_api.RejectReason:
      type: string
      enum:
        - REJECT_REASON_UNSPECIFIED
        - HOLD_FAILURE
        - TOO_MANY_OPEN_ORDERS
        - REJECT_REASON_INSUFFICIENT_FUNDS
        - RATE_LIMIT_EXCEEDED
      default: REJECT_REASON_UNSPECIFIED
    coinbase.public_api.authed.retail_brokerage_api.RiskManagementType:
      type: string
      enum:
        - UNKNOWN_RISK_MANAGEMENT_TYPE
        - MANAGED_BY_FCM
        - MANAGED_BY_VENUE
      default: UNKNOWN_RISK_MANAGEMENT_TYPE
      description: Defines Risk management type.
    coinbase.public_api.authed.retail_brokerage_api.RollingMarketGtc:
      type: object
      properties:
        base_size:
          type: string
        close_only:
          type: boolean
      title: RollingMarketGtc order type for user contract rolls
    coinbase.public_api.authed.retail_brokerage_api.ScaledLimitGtc:
      type: object
      properties:
        orders:
          type: array
          items:
            $ref: >-
              #/components/schemas/coinbase.public_api.authed.retail_brokerage_api.LimitLimitGtc
        quote_size:
          type: string
        base_size:
          type: string
        num_orders:
          type: integer
          format: int32
        min_price:
          type: string
          title: >-
            infer the start / end price of the scaled orders based on the min /
            max price + distribution
        max_price:
          type: string
        price_distribution:
          allOf:
            - $ref: >-
                #/components/schemas/coinbase.public_api.authed.retail_brokerage_api.ScaledPriceDistribution
        size_distribution:
          description: 'Size distribution across the child orders. '
          allOf:
            - $ref: >-
                #/components/schemas/coinbase.public_api.authed.retail_brokerage_api.ScaledSizeDistribution
        size_diff:
          type: string
        size_ratio:
          type: string
      title: >-
        scaled limit order allows user to specify the order size and price on
        the child
    coinbase.public_api.authed.retail_brokerage_api.ScaledOrderDistribution:
      type: object
      properties:
        size:
          type: string
        price:
          type: string
        errs:
          type: array
          items:
            $ref: >-
              #/components/schemas/coinbase.public_api.authed.retail_brokerage_api.PreviewFailureReason
        warning:
          type: array
          items:
            $ref: >-
              #/components/schemas/coinbase.public_api.authed.retail_brokerage_api.PreviewWarningMsg
      title: represents size / price of a scaled order in core proto
    coinbase.public_api.authed.retail_brokerage_api.ScaledOrderMetadata:
      type: object
      properties:
        scaled_order_distribution:
          type: array
          items:
            $ref: >-
              #/components/schemas/coinbase.public_api.authed.retail_brokerage_api.ScaledOrderDistribution
      title: a list of scaled order distributions
    coinbase.public_api.authed.retail_brokerage_api.ScaledPriceDistribution:
      type: string
      enum:
        - FLAT
        - LINEAR_INCREASING
        - LINEAR_DECREASING
        - CUSTOM_PRICE_DISTRIBUTION
      default: FLAT
      title: Defines the distribution of prices for scaled orders
    coinbase.public_api.authed.retail_brokerage_api.ScaledSizeDistribution:
      type: string
      enum:
        - UNKNOWN_DISTRIBUTION
        - INCREASING
        - DECREASING
        - EVENLY_SPLIT
        - CUSTOM_SIZE_DISTRIBUTION
      default: UNKNOWN_DISTRIBUTION
      title: Defines the distribution of sizes for scaled orders
    coinbase.public_api.authed.retail_brokerage_api.SettlementSource:
      type: object
      properties:
        url:
          type: string
        name:
          type: string
      title: >-
        SettlementSource contains settlement data source information for
        prediction markets
    coinbase.public_api.authed.retail_brokerage_api.SingleProductGetProductBookConfig:
      type: object
      properties:
        product_id:
          type: string
          example: BTC-USD
          description: The trading pair (e.g. 'BTC-USD').
          required:
            - product_id
        limit:
          type: integer
          format: int32
          example: 1000
          description: 'The number of bid/asks to be returned. '
    coinbase.public_api.authed.retail_brokerage_api.SorLimitIoc:
      type: object
      properties:
        quote_size:
          type: string
          example: '10.00'
          description: >-
            The amount of the second Asset in the Trading Pair. For example, on
            the BTC/USD Order Book, USD is the Quote Asset.
        base_size:
          type: string
          example: '0.001'
          description: >-
            The amount of the first Asset in the Trading Pair. For example, on
            the BTC-USD Order Book, BTC is the Base Asset.
        limit_price:
          type: string
          example: '10000.00'
          description: >-
            The specified price, or better, that the Order should be executed
            at. A Buy Order will execute at or lower than the limit price. A
            Sell Order will execute at or higher than the limit price.
        rfq_disabled:
          type: boolean
          description: >-
            If true, or if the user is a non-EU region user, this order will be
            attempted to be routed to the exchange CLOB.
    coinbase.public_api.authed.retail_brokerage_api.SorPreference:
      type: string
      enum:
        - SOR_PREFERENCE_UNSPECIFIED
        - SOR_ENABLED
        - SOR_DISABLED
      default: SOR_PREFERENCE_UNSPECIFIED
      title: Defines the Smart Order Routing (SOR) preferences for an order
    coinbase.public_api.authed.retail_brokerage_api.SortOrder:
      type: string
      enum:
        - SORT_ORDER_ASC
        - SORT_ORDER_DESC
      default: SORT_ORDER_ASC
      description: Sort order for paginated responses.
    coinbase.public_api.authed.retail_brokerage_api.StopLimitStopLimitGtc:
      type: object
      properties:
        base_size:
          type: string
          example: '0.001'
          description: >-
            The amount of the first Asset in the Trading Pair. For example, on
            the BTC-USD Order Book, BTC is the Base Asset.
        limit_price:
          type: string
          example: '10000.00'
          description: >-
            The specified price, or better, that the Order should be executed
            at. A Buy Order will execute at or lower than the limit price. A
            Sell Order will execute at or higher than the limit price.
        stop_price:
          type: string
          example: '20000.00'
          description: The specified price that will trigger the placement of the Order.
        stop_direction:
          example: '20000.00'
          description: >-
            The direction of the stop limit Order. If Up, then the Order will
            trigger when the last trade price goes above the stop_price. If
            Down, then the Order will trigger when the last trade price goes
            below the stop_price.
          allOf:
            - $ref: >-
                #/components/schemas/coinbase.public_api.authed.retail_brokerage_api.StopPriceDirection
    coinbase.public_api.authed.retail_brokerage_api.StopLimitStopLimitGtd:
      type: object
      properties:
        base_size:
          type: string
          example: 0.001
          description: >-
            The amount of the first Asset in the Trading Pair. For example, on
            the BTC-USD Order Book, BTC is the Base Asset.
        limit_price:
          type: string
          example: '10000.00'
          description: >-
            The specified price, or better, that the Order should be executed
            at. A Buy Order will execute at or lower than the limit price. A
            Sell Order will execute at or higher than the limit price.
        stop_price:
          type: string
          example: '20000.00'
          description: The specified price that will trigger the placement of the Order.
        end_time:
          type: string
          format: RFC3339 Timestamp
          example: 2021-05-31T09:59:59.000Z
          description: The time at which the order will be cancelled if it is not Filled.
        stop_direction:
          example: '20000.00'
          description: >-
            The direction of the stop limit Order. If Up, then the Order will
            trigger when the last trade price goes above the stop_price. If
            Down, then the Order will trigger when the last trade price goes
            below the stop_price.
          allOf:
            - $ref: >-
                #/components/schemas/coinbase.public_api.authed.retail_brokerage_api.StopPriceDirection
    coinbase.public_api.authed.retail_brokerage_api.StopPriceDirection:
      type: string
      enum:
        - STOP_DIRECTION_STOP_UP
        - STOP_DIRECTION_STOP_DOWN
      default: ''
      title: >-
        - STOP_DIRECTION_STOP_UP: Order will trigger if the last trade price
        goes above the stop price
         - STOP_DIRECTION_STOP_DOWN: Order will trigger if the last trade price goes below the stop price
    coinbase.public_api.authed.retail_brokerage_api.StopTriggerStatus:
      type: string
      enum:
        - UNKNOWN_TRIGGER_STATUS
        - INVALID_ORDER_TYPE
        - STOP_PENDING
        - STOP_TRIGGERED
      default: UNKNOWN_TRIGGER_STATUS
    coinbase.public_api.authed.retail_brokerage_api.SubjectReference:
      type: object
      properties:
        subject_type:
          type: string
        subject_id:
          type: string
      description: >-
        SubjectReference represents a reference to an external entity that a
        prediction market relates to.
    coinbase.public_api.authed.retail_brokerage_api.TimeInForceType:
      type: string
      enum:
        - UNKNOWN_TIME_IN_FORCE
        - GOOD_UNTIL_DATE_TIME
        - GOOD_UNTIL_CANCELLED
        - IMMEDIATE_OR_CANCEL
        - FILL_OR_KILL
      default: UNKNOWN_TIME_IN_FORCE
      title: |-
        - GOOD_UNTIL_DATE_TIME: GTD
         - GOOD_UNTIL_CANCELLED: GTC: on the books virtually forever
         - IMMEDIATE_OR_CANCEL: IOC: fill what you can now, cancel the rest
         - FILL_OR_KILL: FOK: all or nothing, right now
    coinbase.public_api.authed.retail_brokerage_api.TradableStatusFilter:
      type: object
      properties:
        value:
          type: boolean
      title: Filter for tradable status i.e. whether a product is tradable or not
    coinbase.public_api.authed.retail_brokerage_api.TradingDayData:
      type: object
      properties:
        trading_days:
          type: array
          items:
            $ref: >-
              #/components/schemas/coinbase.public_api.authed.retail_brokerage_api.EquityTradingDayInfo
      title: >-
        TradingDayData provides recent historical trading day information for
        downstream services to calculate timezone-aware price changes
    coinbase.public_api.authed.retail_brokerage_api.TriggerBracketGtc:
      type: object
      properties:
        base_size:
          type: string
          example: 0.001
          description: >-
            The amount of the first Asset in the Trading Pair. For example, on
            the BTC-USD Order Book, BTC is the Base Asset.
        limit_price:
          type: string
          example: '10000.00'
          description: >-
            The specified price, or better, that the Order should be executed
            at. A Buy Order will execute at or lower than the limit price. A
            Sell Order will execute at or higher than the limit price.
        stop_trigger_price:
          type: string
          example: '20000.00'
          description: >-
            The price level (in quote currency) where the position will be
            exited. When triggered, a stop limit order is automatically placed
            with a limit price 5% higher for BUYS and 5% lower for SELLS.
    coinbase.public_api.authed.retail_brokerage_api.TriggerBracketGtd:
      type: object
      properties:
        base_size:
          type: string
          example: 0.001
          description: >-
            The amount of the first Asset in the Trading Pair. For example, on
            the BTC-USD Order Book, BTC is the Base Asset.
        limit_price:
          type: string
          example: '10000.00'
          description: >-
            The specified price, or better, that the Order should be executed
            at. A Buy Order will execute at or lower than the limit price. A
            Sell Order will execute at or higher than the limit price.
        stop_trigger_price:
          type: string
          example: '20000.00'
          description: >-
            The price level (in quote currency) where the position will be
            exited. When triggered, a stop limit order is automatically placed
            with a limit price 5% higher for BUYS and 5% lower for SELLS.
        end_time:
          type: string
          format: RFC3339 Timestamp
          example: 2021-05-31T09:59:59.000Z
          description: The time at which the order will be cancelled if it is not Filled.
    coinbase.public_api.authed.retail_brokerage_api.TriggerBracketPnl:
      type: object
      properties:
        take_profit_pnl:
          type: string
          description: PNL if an attached order fills at the take profit price.
        stop_loss_pnl:
          type: string
          description: PNL if an attached order fills at the stop loss price
      title: PNL Configurations
    coinbase.public_api.authed.retail_brokerage_api.TwapBucketMetadata:
      type: object
      properties:
        bucket_duration:
          type: string
        bucket_size:
          type: string
        number_buckets:
          type: string
        start_time:
          type: string
          format: RFC3339 Timestamp
        end_time:
          type: string
          format: RFC3339 Timestamp
      title: >-
        Twap bucket metadata - size/duration of each suborder into which twap is
        broken into
    coinbase.public_api.authed.retail_brokerage_api.TwapLimitGtd:
      type: object
      properties:
        quote_size:
          type: string
          example: '10.00'
          description: >-
            The amount of the second Asset in the Trading Pair. For example, on
            the BTC/USD Order Book, USD is the Quote Asset.
        base_size:
          type: string
          example: '0.001'
          description: >-
            The amount of the first Asset in the Trading Pair. For example, on
            the BTC-USD Order Book, BTC is the Base Asset.
        start_time:
          type: string
          format: RFC3339 Timestamp
          example: 2021-05-31T07:59:59.000Z
          description: Time at which the order should begin executing.
        end_time:
          type: string
          format: RFC3339 Timestamp
          example: 2021-05-31T09:59:59.000Z
          description: The time at which the order will be cancelled if it is not Filled.
        limit_price:
          type: string
          example: '10000.00'
          description: >-
            The specified price, or better, that the Order should be executed
            at. A Buy Order will execute at or lower than the limit price. A
            Sell Order will execute at or higher than the limit price.
        number_buckets:
          type: string
          example: '5'
          description: >-
            The number of smaller buckets/suborders over which the entire order
            will be broken into. Each suborder will be executed over a duration
            calculated based on the end_time
        bucket_size:
          type: string
          example: '2.00'
          description: >-
            The size of each suborder. bucket_size multiplied by number_buckets
            should match the size of the entire twap order)
        bucket_duration:
          type: string
          example: 300s
          description: The duration over which each sub order was executed
    coinbase.public_api.authed.retail_brokerage_api.Volume:
      type: object
      properties:
        volume_type:
          example: VOLUME_TYPE_SPOT
          description: Type of volume contributing to fee tier calculation.
          allOf:
            - $ref: >-
                #/components/schemas/coinbase.public_api.authed.retail_brokerage_api.VolumeType
        volume:
          type: number
          format: double
          example: 1000
          description: Volume amount.
    coinbase.public_api.authed.retail_brokerage_api.VolumeType:
      type: string
      enum:
        - VOLUME_TYPE_UNKNOWN
        - VOLUME_TYPE_SPOT
        - VOLUME_TYPE_INTX_PERPS
        - VOLUME_TYPE_US_DERIVATIVES
        - VOLUME_TYPE_SIMPLE_SPOT
        - VOLUME_TYPE_SIMPLE_FCM
        - VOLUME_TYPE_SIMPLE_INTX_PERPS
      default: VOLUME_TYPE_UNKNOWN
      title: |-
        - VOLUME_TYPE_UNKNOWN: Unknown or unspecified volume type
         - VOLUME_TYPE_SPOT: Spot trading volume
         - VOLUME_TYPE_INTX_PERPS: International exchange perpetual contracts volume
         - VOLUME_TYPE_US_DERIVATIVES: US derivatives (futures) trading volume
         - VOLUME_TYPE_SIMPLE_SPOT: Simple (RETAIL_SIMPLE) spot trading volume
         - VOLUME_TYPE_SIMPLE_FCM: Simple (RETAIL_SIMPLE) FCM expiring futures trading volume
         - VOLUME_TYPE_SIMPLE_INTX_PERPS: Simple (RETAIL_SIMPLE) INTX perpetual futures trading volume
    coinbase.public_api.authed.retail_brokerage_api.VolumeTypesAndRange:
      type: object
      properties:
        volume_types:
          type: array
          example:
            - VOLUME_TYPE_SPOT
            - VOLUME_TYPE_US_DERIVATIVES
          items:
            $ref: >-
              #/components/schemas/coinbase.public_api.authed.retail_brokerage_api.VolumeType
          description: Volume types to combine to contribute to this fee tier calculation.
        vol_from:
          type: string
          example: '0'
          description: Lower bound (inclusive) for the combined volume.
        vol_to:
          type: string
          example: '50000'
          description: Upper bound (exclusive) for the combined volume .
      title: >-
        VolumeTypesAndRange defines volume-based fee tier configurations that
        combine multiple volume types
    coinbase.retail.rest.proxy.common.ExtendedTimestamp:
      type: object
      properties:
        iso:
          type: string
          description: An ISO-8601 representation of the timestamp
        epochSeconds:
          type: string
          format: int64
          description: A second-precision representation of the timestamp
        epochMillis:
          type: string
          format: int64
          description: A millisecond-precision representation of the timestamp
    coinbase.retail.rest.proxy.convert.CommitConvertTradeRequest:
      type: object
      properties:
        from_account:
          type: string
          description: The currency of the account to convert from (e.g. USD).
        to_account:
          type: string
          description: The currency of the account to convert to (e.g. USDC).
    coinbase.retail.rest.proxy.convert.CommitConvertTradeResponse:
      type: object
      properties:
        trade:
          allOf:
            - $ref: >-
                #/components/schemas/coinbase.retail.rest.proxy.convert.RatConvertTrade
    coinbase.retail.rest.proxy.convert.CreateConvertQuoteRequest:
      type: object
      properties:
        from_account:
          type: string
          description: The currency of the account to convert from (e.g. USD).
        to_account:
          type: string
          description: The currency of the account to convert to (e.g. USDC).
        amount:
          type: string
          description: >-
            The amount to be converted (denominated in the currency specified in
            `from_account`).
        trade_incentive_metadata:
          description: Trade incentive to waive trade fees.
          allOf:
            - $ref: >-
                #/components/schemas/coinbase.simple_trade.TradeIncentiveMetadata
      title: ''
    coinbase.retail.rest.proxy.convert.CreateConvertQuoteResponse:
      type: object
      properties:
        trade:
          allOf:
            - $ref: >-
                #/components/schemas/coinbase.retail.rest.proxy.convert.RatConvertTrade
    coinbase.retail.rest.proxy.convert.GetConvertTradeResponse:
      type: object
      properties:
        trade:
          allOf:
            - $ref: >-
                #/components/schemas/coinbase.retail.rest.proxy.convert.RatConvertTrade
    coinbase.retail.rest.proxy.convert.RatConvertTrade:
      type: object
      properties:
        id:
          type: string
          description: The trade ID used to get and commit the trade.
        status:
          allOf:
            - $ref: '#/components/schemas/coinbase.simple_trade.TradeStatus'
        user_entered_amount:
          allOf:
            - $ref: '#/components/schemas/coinbase.consumer.shared.common.Amount'
        amount:
          allOf:
            - $ref: '#/components/schemas/coinbase.consumer.shared.common.Amount'
        subtotal:
          allOf:
            - $ref: '#/components/schemas/coinbase.consumer.shared.common.Amount'
        total:
          allOf:
            - $ref: '#/components/schemas/coinbase.consumer.shared.common.Amount'
        fees:
          type: array
          items:
            $ref: '#/components/schemas/coinbase.simple_trade.models.Fee'
          description: List of fees associated with the trade
        total_fee:
          allOf:
            - $ref: '#/components/schemas/coinbase.simple_trade.models.Fee'
        source:
          allOf:
            - $ref: >-
                #/components/schemas/coinbase.payments.common.payment_methods.PaymentMethod
        target:
          allOf:
            - $ref: >-
                #/components/schemas/coinbase.payments.common.payment_methods.PaymentMethod
        unit_price:
          allOf:
            - $ref: '#/components/schemas/coinbase.simple_trade.models.UnitPrice'
        user_warnings:
          type: array
          items:
            $ref: '#/components/schemas/coinbase.simple_trade.models.UserWarning'
        user_reference:
          type: string
        source_currency:
          type: string
          description: The currency of the source account
        target_currency:
          type: string
          description: The currency of the target account
        cancellation_reason:
          allOf:
            - $ref: '#/components/schemas/coinbase.simple_trade.models.Error'
        source_id:
          type: string
        target_id:
          type: string
        subscription_info:
          allOf:
            - $ref: '#/components/schemas/coinbase.simple_trade.SubscriptionInfo'
        exchange_rate:
          allOf:
            - $ref: '#/components/schemas/coinbase.consumer.shared.common.Amount'
        tax_details:
          type: array
          items:
            $ref: '#/components/schemas/coinbase.simple_trade.TaxInfo'
        trade_incentive_info:
          allOf:
            - $ref: '#/components/schemas/coinbase.simple_trade.TradeIncentiveInfo'
        total_fee_without_tax:
          allOf:
            - $ref: '#/components/schemas/coinbase.simple_trade.models.Fee'
        fiat_denoted_total:
          allOf:
            - $ref: '#/components/schemas/coinbase.consumer.shared.common.Amount'
      title: ''
    coinbase.retail.rest.proxy.fcm.CancelFCMSweepResponse:
      type: object
      properties:
        success:
          type: boolean
    coinbase.retail.rest.proxy.fcm.FCMBalanceSummary:
      type: object
      properties:
        futures_buying_power:
          description: >-
            The amount of your cash balance that is available to trade CFM
            futures
          allOf:
            - $ref: '#/components/schemas/coinbase.consumer.shared.common.Amount'
        total_usd_balance:
          description: >-
            Aggregate USD maintained across your CFTC-regulated futures account
            and your Coinbase Inc. spot account
          allOf:
            - $ref: '#/components/schemas/coinbase.consumer.shared.common.Amount'
        cbi_usd_balance:
          description: USD maintained in your Coinbase Inc. spot account
          allOf:
            - $ref: '#/components/schemas/coinbase.consumer.shared.common.Amount'
        cfm_usd_balance:
          description: >-
            USD maintained in your CFTC-regulated futures account. Funds held in
            your futures account are not available to trade spot
          allOf:
            - $ref: '#/components/schemas/coinbase.consumer.shared.common.Amount'
        total_open_orders_hold_amount:
          description: Your total balance on hold for spot and futures open orders
          allOf:
            - $ref: '#/components/schemas/coinbase.consumer.shared.common.Amount'
        unrealized_pnl:
          description: Your current unrealized PnL across all open positions
          allOf:
            - $ref: '#/components/schemas/coinbase.consumer.shared.common.Amount'
        daily_realized_pnl:
          description: >-
            Your realized PnL from the current trade date. May include profit or
            loss from positions you've closed on the current trade date
          allOf:
            - $ref: '#/components/schemas/coinbase.consumer.shared.common.Amount'
        initial_margin:
          description: >-
            Margin required to initiate futures positions. Once futures orders
            are placed, these funds cannot be used to trade spot. The actual
            amount of funds necessary to support executed futures orders will be
            moved to your futures account
          allOf:
            - $ref: '#/components/schemas/coinbase.consumer.shared.common.Amount'
        available_margin:
          description: >-
            Funds available to meet your anticipated margin requirement. This
            includes your CBI spot USD, CFM futures USD, and Futures PnL, less
            any holds for open spot or futures orders
          allOf:
            - $ref: '#/components/schemas/coinbase.consumer.shared.common.Amount'
        liquidation_threshold:
          description: >-
            When your available funds for collateral drop to the liquidation
            threshold, some or all of your futures positions will be liquidated
          allOf:
            - $ref: '#/components/schemas/coinbase.consumer.shared.common.Amount'
        liquidation_buffer_amount:
          description: >-
            Funds available in excess of the liquidation threshold, calculated
            as available margin minus liquidation threshold. If your liquidation
            buffer amount reaches 0, your futures positions and/or open orders
            will be liquidated as necessary
          allOf:
            - $ref: '#/components/schemas/coinbase.consumer.shared.common.Amount'
        liquidation_buffer_percentage:
          type: string
          description: >-
            Funds available in excess of the liquidation threshold expressed as
            a percentage. If your liquidation buffer percentage reaches 0%, your
            futures positions and/or open orders will be liquidated as necessary
        intraday_margin_window_measure:
          allOf:
            - $ref: >-
                #/components/schemas/coinbase.retail.rest.proxy.fcm.FcmMarginWindowMeasure
        overnight_margin_window_measure:
          allOf:
            - $ref: >-
                #/components/schemas/coinbase.retail.rest.proxy.fcm.FcmMarginWindowMeasure
        total_pending_transfers_amount:
          description: Total value of pending transfers
          allOf:
            - $ref: '#/components/schemas/coinbase.consumer.shared.common.Amount'
        funding_pnl:
          description: Portfolio funding PnL (only for US Perpetuals Futures)
          allOf:
            - $ref: '#/components/schemas/coinbase.consumer.shared.common.Amount'
    coinbase.retail.rest.proxy.fcm.FCMPosition:
      type: object
      properties:
        product_id:
          type: string
          description: The ticker symbol (e.g. 'BIT-28JUL23-CDE').
        expiration_time:
          type: string
          format: RFC3339 Timestamp
          description: The expiry of your position
        side:
          description: The side of your position
          allOf:
            - $ref: >-
                #/components/schemas/coinbase.retail.rest.proxy.fcm.FCMPositionSide
        number_of_contracts:
          type: string
          description: The size of your position in contracts
        current_price:
          type: string
          description: The current price of the product
        avg_entry_price:
          type: string
          description: The average entry price at which you entered your current position
        unrealized_pnl:
          type: string
          description: Your current unrealized PnL for your position
        daily_realized_pnl:
          type: string
          description: >-
            Your realized PnL from your trades in this product on current trade
            date
    coinbase.retail.rest.proxy.fcm.FCMPositionSide:
      type: string
      enum:
        - UNKNOWN
        - LONG
        - SHORT
      default: UNKNOWN
    coinbase.retail.rest.proxy.fcm.FCMSweep:
      type: object
      properties:
        id:
          type: string
          description: The ID of the sweep request scheduled
        requested_amount:
          description: The requested sweep amount
          allOf:
            - $ref: '#/components/schemas/coinbase.consumer.shared.common.Amount'
        should_sweep_all:
          type: boolean
          description: >-
            True if the request was to sweep all available funds from your CFM
            futures account
        status:
          description: >-
            A pending sweep is a sweep that has not started processing and can
            be cancelled. A processing sweep is a sweep that is currently being
            processed and cannot be cancelled
          allOf:
            - $ref: >-
                #/components/schemas/coinbase.retail.rest.proxy.fcm.FCMSweepStatus
        scheduled_time:
          type: string
          format: RFC3339 Timestamp
          description: The timestamp at which the sweep request was submitted
    coinbase.retail.rest.proxy.fcm.FCMSweepStatus:
      type: string
      enum:
        - UNKNOWN_FCM_SWEEP_STATUS
        - PENDING
        - PROCESSING
      default: UNKNOWN_FCM_SWEEP_STATUS
    coinbase.retail.rest.proxy.fcm.FcmMarginWindowMeasure:
      type: object
      properties:
        margin_window_type:
          description: Your margin window
          allOf:
            - $ref: >-
                #/components/schemas/coinbase.retail.rest.proxy.fcm.FcmMarginWindowType
        margin_level:
          description: Margin level for liquidation purposes
          allOf:
            - $ref: >-
                #/components/schemas/coinbase.retail.rest.proxy.fcm.MarginLevelType
        initial_margin:
          type: string
          description: Initial margin
        maintenance_margin:
          type: string
          description: Maintenance margin
        liquidation_buffer:
          type: string
          description: Liquidation buffer
        total_hold:
          type: string
          description: Total Hold
        futures_buying_power:
          type: string
          description: >-
            The amount of your cash balance that is available to trade CFM
            futures
    coinbase.retail.rest.proxy.fcm.FcmMarginWindowType:
      type: string
      enum:
        - FCM_MARGIN_WINDOW_TYPE_UNSPECIFIED
        - FCM_MARGIN_WINDOW_TYPE_OVERNIGHT
        - FCM_MARGIN_WINDOW_TYPE_WEEKEND
        - FCM_MARGIN_WINDOW_TYPE_INTRADAY
        - FCM_MARGIN_WINDOW_TYPE_TRANSITION
      default: FCM_MARGIN_WINDOW_TYPE_UNSPECIFIED
    coinbase.retail.rest.proxy.fcm.GetCurrentMarginWindowResponse:
      type: object
      properties:
        margin_window:
          allOf:
            - $ref: '#/components/schemas/coinbase.retail.rest.proxy.fcm.MarginWindow'
        is_intraday_margin_killswitch_enabled:
          type: boolean
          description: True if intraday margin killswitch is enabled
        is_intraday_margin_enrollment_killswitch_enabled:
          type: boolean
          description: True if intraday margin enrollment killswitch is enabled
      title: GetCurrentMarginWindowResponse
    coinbase.retail.rest.proxy.fcm.GetFCMBalanceSummaryResponse:
      type: object
      properties:
        balance_summary:
          allOf:
            - $ref: >-
                #/components/schemas/coinbase.retail.rest.proxy.fcm.FCMBalanceSummary
    coinbase.retail.rest.proxy.fcm.GetFCMPositionResponse:
      type: object
      properties:
        position:
          allOf:
            - $ref: '#/components/schemas/coinbase.retail.rest.proxy.fcm.FCMPosition'
    coinbase.retail.rest.proxy.fcm.GetFCMPositionsResponse:
      type: object
      properties:
        positions:
          type: array
          items:
            $ref: '#/components/schemas/coinbase.retail.rest.proxy.fcm.FCMPosition'
    coinbase.retail.rest.proxy.fcm.GetFCMSweepsResponse:
      type: object
      properties:
        sweeps:
          type: array
          items:
            $ref: '#/components/schemas/coinbase.retail.rest.proxy.fcm.FCMSweep'
    coinbase.retail.rest.proxy.fcm.GetIntradayMarginSettingResponse:
      type: object
      properties:
        setting:
          allOf:
            - $ref: >-
                #/components/schemas/coinbase.retail.rest.proxy.fcm.IntradayMarginSetting
      title: GetIntradayMarginSettingResponse
    coinbase.retail.rest.proxy.fcm.IntradayMarginSetting:
      type: string
      enum:
        - INTRADAY_MARGIN_SETTING_UNSPECIFIED
        - INTRADAY_MARGIN_SETTING_STANDARD
        - INTRADAY_MARGIN_SETTING_INTRADAY
      default: INTRADAY_MARGIN_SETTING_UNSPECIFIED
      title: ''
    coinbase.retail.rest.proxy.fcm.MarginLevelType:
      type: string
      enum:
        - MARGIN_LEVEL_TYPE_UNSPECIFIED
        - MARGIN_LEVEL_TYPE_BASE
        - MARGIN_LEVEL_TYPE_WARNING
        - MARGIN_LEVEL_TYPE_DANGER
        - MARGIN_LEVEL_TYPE_LIQUIDATION
      default: MARGIN_LEVEL_TYPE_UNSPECIFIED
      title: margin level for liquidation purposes
    coinbase.retail.rest.proxy.fcm.MarginProfileType:
      type: string
      enum:
        - MARGIN_PROFILE_TYPE_UNSPECIFIED
        - MARGIN_PROFILE_TYPE_RETAIL_REGULAR
        - MARGIN_PROFILE_TYPE_RETAIL_INTRADAY_MARGIN_1
      default: MARGIN_PROFILE_TYPE_UNSPECIFIED
    coinbase.retail.rest.proxy.fcm.MarginWindow:
      type: object
      properties:
        margin_window_type:
          description: Your margin window
          allOf:
            - $ref: >-
                #/components/schemas/coinbase.retail.rest.proxy.fcm.MarginWindowType
        end_time:
          type: string
          format: RFC3339 Timestamp
          description: The end time of the margin window
    coinbase.retail.rest.proxy.fcm.MarginWindowType:
      type: string
      enum:
        - MARGIN_WINDOW_TYPE_UNSPECIFIED
        - MARGIN_WINDOW_TYPE_OVERNIGHT
        - MARGIN_WINDOW_TYPE_WEEKEND
        - MARGIN_WINDOW_TYPE_INTRADAY
        - MARGIN_WINDOW_TYPE_TRANSITION
      default: MARGIN_WINDOW_TYPE_UNSPECIFIED
      title: ''
    coinbase.retail.rest.proxy.fcm.ScheduleFCMSweepRequest:
      type: object
      properties:
        usd_amount:
          type: string
          description: >-
            The amount of USD to be swept. By default, sweeps all available
            excess funds.
      title: ''
    coinbase.retail.rest.proxy.fcm.ScheduleFCMSweepResponse:
      type: object
      properties:
        success:
          type: boolean
    coinbase.retail.rest.proxy.fcm.SetIntradayMarginSettingRequest:
      type: object
      properties:
        setting:
          description: >-
            The margin setting for the account. Describes whether the account is
            opted in to receive increased leverage during weekdays (8am-4pm ET),
            excluding [market
            holidays](https://www.coinbase.com/derivatives/market-notices).
          allOf:
            - $ref: >-
                #/components/schemas/coinbase.retail.rest.proxy.fcm.IntradayMarginSetting
      title: SetIntradayMarginSettingRequest
    coinbase.retail.rest.proxy.fcm.SetIntradayMarginSettingResponse:
      type: object
      title: SetIntradayMarginSettingResponse
    coinbase.retail.rest.proxy.intx.AllocatePortfolioRequest:
      type: object
      properties:
        portfolio_uuid:
          type: string
          description: The portfolio UUID.
        symbol:
          type: string
          description: The trading pair (e.g. 'BTC-PERP-INTX').
        amount:
          type: string
          description: The amount to be allocated for the specified isolated position.
        currency:
          type: string
          description: >-
            The currency to be allocated for the specific isolated position
            (e.g. USD, BTC, etc).
    coinbase.retail.rest.proxy.intx.AllocatePortfolioResponse:
      type: object
    coinbase.retail.rest.proxy.intx.Amount:
      type: object
      properties:
        value:
          type: string
          description: Value of the Amount
        currency:
          type: string
          description: >-
            The currency to be allocated for the specific isolated position
            (e.g. USD, BTC, etc).
      title: Message that represents the monetary amount.
    coinbase.retail.rest.proxy.intx.GetPortfoliosResponse:
      type: object
      properties:
        portfolios:
          type: array
          items:
            $ref: '#/components/schemas/coinbase.retail.rest.proxy.intx.Portfolio'
        summary:
          allOf:
            - $ref: >-
                #/components/schemas/coinbase.retail.rest.proxy.intx.PortfoliosSummary
    coinbase.retail.rest.proxy.intx.GetPositionResponse:
      type: object
      properties:
        position:
          allOf:
            - $ref: '#/components/schemas/coinbase.retail.rest.proxy.intx.Position'
    coinbase.retail.rest.proxy.intx.GetPositionsResponse:
      type: object
      properties:
        positions:
          type: array
          items:
            $ref: '#/components/schemas/coinbase.retail.rest.proxy.intx.Position'
        summary:
          allOf:
            - $ref: >-
                #/components/schemas/coinbase.retail.rest.proxy.intx.PositionSummary
    coinbase.retail.rest.proxy.intx.MultiAssetCollateralRequest:
      type: object
      properties:
        portfolio_uuid:
          type: string
          description: The portfolio UUID.
        multi_asset_collateral_enabled:
          type: boolean
          description: Enable or disable Multi Asset Collateral.
      title: Multi Asset Collateral
    coinbase.retail.rest.proxy.intx.MultiAssetCollateralResponse:
      type: object
      properties:
        multi_asset_collateral_enabled:
          type: boolean
    coinbase.retail.rest.proxy.intx.Portfolio:
      type: object
      properties:
        portfolio_uuid:
          type: string
          description: The portfolio UUID.
        collateral:
          type: string
          description: The total collateral value in USDC for the portfolio
        position_notional:
          type: string
          description: >-
            The total position notional value in USDC for all positions in the
            portfolio
        open_position_notional:
          type: string
          description: >-
            The total position notional value in USDC for all open orders and
            positions
        pending_fees:
          type: string
          description: The accrued fees that has not been paid yet in USDC
        borrow:
          type: string
          description: >-
            Total borrow amount in USDC (nets the USDC balance, position PNL,
            held USDC, accured interest and rolling debt)
        accrued_interest:
          type: string
          description: Interest charged for borrowed USDC balances
        rolling_debt:
          type: string
          description: Amount of settled transactions that hasn't been paid
        portfolio_initial_margin:
          type: string
          description: >-
            The weighted average of all the position's initial margin
            utilization
        portfolio_im_notional:
          allOf:
            - $ref: '#/components/schemas/coinbase.retail.rest.proxy.intx.Amount'
        portfolio_maintenance_margin:
          type: string
          description: The maintenance margin of the portfolio
        portfolio_mm_notional:
          allOf:
            - $ref: '#/components/schemas/coinbase.retail.rest.proxy.intx.Amount'
        liquidation_percentage:
          type: string
          description: The liquidation percentage of the portfolio
        liquidation_buffer:
          type: string
          description: The liquidation buffer of the portfolio
        margin_type:
          allOf:
            - $ref: '#/components/schemas/coinbase.intx_common.PortfolioMarginType'
        margin_flags:
          allOf:
            - $ref: '#/components/schemas/coinbase.intx_common.PortfolioMarginFlags'
        liquidation_status:
          allOf:
            - $ref: >-
                #/components/schemas/coinbase.intx_common.PortfolioLiquidationStatus
        unrealized_pnl:
          allOf:
            - $ref: '#/components/schemas/coinbase.retail.rest.proxy.intx.Amount'
        total_balance:
          allOf:
            - $ref: '#/components/schemas/coinbase.retail.rest.proxy.intx.Amount'
    coinbase.retail.rest.proxy.intx.PortfoliosSummary:
      type: object
      properties:
        unrealized_pnl:
          allOf:
            - $ref: '#/components/schemas/coinbase.retail.rest.proxy.intx.Amount'
        buying_power:
          allOf:
            - $ref: '#/components/schemas/coinbase.retail.rest.proxy.intx.Amount'
        total_balance:
          allOf:
            - $ref: '#/components/schemas/coinbase.retail.rest.proxy.intx.Amount'
        max_withdrawal_amount:
          allOf:
            - $ref: '#/components/schemas/coinbase.retail.rest.proxy.intx.Amount'
    coinbase.retail.rest.proxy.intx.Position:
      type: object
      properties:
        product_id:
          type: string
          description: The unique identifier of the instrument the position is in.
        product_uuid:
          type: string
          description: The unique identifier of the instrument the position is in.
        portfolio_uuid:
          type: string
          description: The portfolio UUID.
        symbol:
          type: string
          description: The trading pair (e.g. 'BTC-PERP-INTX').
        vwap:
          allOf:
            - $ref: '#/components/schemas/coinbase.retail.rest.proxy.intx.Amount'
        entry_vwap:
          allOf:
            - $ref: '#/components/schemas/coinbase.retail.rest.proxy.intx.Amount'
        position_side:
          allOf:
            - $ref: '#/components/schemas/coinbase.intx_common.PositionSide'
        margin_type:
          allOf:
            - $ref: '#/components/schemas/coinbase.intx_common.PortfolioMarginType'
        net_size:
          type: string
          description: >-
            The size of the position with positive values reflecting a long
            position and negative values reflecting a short position.
        buy_order_size:
          type: string
          description: Cumulative size of all the open buy orders
        sell_order_size:
          type: string
          description: Cumulative size of all the open sell orders
        im_contribution:
          type: string
          description: The amount this position contributes to the initial margin
        unrealized_pnl:
          allOf:
            - $ref: '#/components/schemas/coinbase.retail.rest.proxy.intx.Amount'
        mark_price:
          allOf:
            - $ref: '#/components/schemas/coinbase.retail.rest.proxy.intx.Amount'
        liquidation_price:
          allOf:
            - $ref: '#/components/schemas/coinbase.retail.rest.proxy.intx.Amount'
        leverage:
          type: string
          description: The leverage of this position
        im_notional:
          allOf:
            - $ref: '#/components/schemas/coinbase.retail.rest.proxy.intx.Amount'
        mm_notional:
          allOf:
            - $ref: '#/components/schemas/coinbase.retail.rest.proxy.intx.Amount'
        position_notional:
          allOf:
            - $ref: '#/components/schemas/coinbase.retail.rest.proxy.intx.Amount'
        aggregated_pnl:
          allOf:
            - $ref: '#/components/schemas/coinbase.retail.rest.proxy.intx.Amount'
    coinbase.retail.rest.proxy.intx.PositionSummary:
      type: object
      properties:
        aggregated_pnl:
          allOf:
            - $ref: '#/components/schemas/coinbase.retail.rest.proxy.intx.Amount'
    coinbase.retail.rest.proxy.payment_method.GetPaymentMethodResponse:
      type: object
      properties:
        payment_method:
          allOf:
            - $ref: >-
                #/components/schemas/coinbase.retail.rest.proxy.payment_method.PaymentMethod
    coinbase.retail.rest.proxy.payment_method.GetPaymentMethodsResponse:
      type: object
      properties:
        payment_methods:
          type: array
          items:
            $ref: >-
              #/components/schemas/coinbase.retail.rest.proxy.payment_method.PaymentMethod
    coinbase.retail.rest.proxy.payment_method.PaymentMethod:
      type: object
      properties:
        id:
          type: string
          example: 8bfc20d7-f7c6-4422-bf07-8243ca4169fe
          description: Unique identifier for the payment method.
        type:
          type: string
          example: ACH
          description: The payment method type.
        name:
          type: string
          example: ALLY BANK ******1234
          description: Name for the payment method.
        currency:
          type: string
          example: USD
          description: Currency symbol for the payment method.
        verified:
          type: boolean
          example: true
          description: The verified status of the payment method.
        allow_buy:
          type: boolean
          example: true
          description: Whether or not this payment method can perform buys.
        allow_sell:
          type: boolean
          example: true
          description: Whether or not this payment method can perform sells.
        allow_deposit:
          type: boolean
          example: true
          description: Whether or not this payment method can perform deposits.
        allow_withdraw:
          type: boolean
          example: true
          description: Whether or not this payment method can perform withdrawals.
        created_at:
          type: string
          format: RFC3339 Timestamp
          example: 2021-05-31T09:59:59.000Z
          description: Time at which this payment method was created.
        updated_at:
          type: string
          format: RFC3339 Timestamp
          example: 2021-05-31T09:59:59.000Z
          description: Time at which this payment method was updated.
    coinbase.retail.rest.proxy.utility.GetApiKeyPermissionsResponse:
      type: object
      properties:
        can_view:
          type: boolean
          description: Indicates whether the API key has view permissions.
        can_trade:
          type: boolean
          description: Indicates whether the API key has trade permissions.
        can_transfer:
          type: boolean
          description: Indicates whether the API key has deposit/withdrawal permissions.
        can_receive:
          type: boolean
          description: >-
            Indicates whether the API key has receive inbound payments
            permissions.
        portfolio_uuid:
          type: string
          description: The portfolio ID associated with the API key.
        portfolio_type:
          description: The type of portfolio
          allOf:
            - $ref: '#/components/schemas/coinbase.portfolio_service.PortfolioType'
    coinbase.simple_trade.SubscriptionInfo:
      type: object
      properties:
        free_trading_reset_date:
          type: string
          format: RFC3339 Timestamp
        used_zero_fee_trading:
          allOf:
            - $ref: '#/components/schemas/coinbase.consumer.shared.common.Amount'
        remaining_free_trading_volume:
          allOf:
            - $ref: '#/components/schemas/coinbase.consumer.shared.common.Amount'
        max_free_trading_volume:
          allOf:
            - $ref: '#/components/schemas/coinbase.consumer.shared.common.Amount'
        has_benefit_cap:
          type: boolean
        applied_subscription_benefit:
          type: boolean
        fee_without_subscription_benefit:
          allOf:
            - $ref: '#/components/schemas/coinbase.consumer.shared.common.Amount'
        payment_method_fee_without_subscription_benefit:
          allOf:
            - $ref: '#/components/schemas/coinbase.consumer.shared.common.Amount'
      title: >-
        SubscriptionInfo is the user's coinbase one subscription info for the
        trade
    coinbase.simple_trade.TaxInfo:
      type: object
      properties:
        name:
          type: string
        amount:
          allOf:
            - $ref: '#/components/schemas/coinbase.consumer.shared.common.Amount'
      title: >-
        TaxInfo contains all the information of any tax which is applicable for
        a trade
    coinbase.simple_trade.TradeIncentiveInfo:
      type: object
      properties:
        applied_incentive:
          type: boolean
        user_incentive_id:
          type: string
        code_val:
          type: string
        ends_at:
          type: string
          format: RFC3339 Timestamp
        fee_without_incentive:
          allOf:
            - $ref: '#/components/schemas/coinbase.consumer.shared.common.Amount'
        redeemed:
          type: boolean
      title: >-
        TradeIncentiveInfo contains the user's simple trade incentive info for
        the trade
    coinbase.simple_trade.TradeIncentiveMetadata:
      type: object
      properties:
        user_incentive_id:
          type: string
          description: The user incentive id.
        code_val:
          type: string
          description: A promo code for waiving fees.
      title: TradeIncentiveMetadata
    coinbase.simple_trade.TradeStatus:
      type: string
      enum:
        - TRADE_STATUS_UNSPECIFIED
        - TRADE_STATUS_CREATED
        - TRADE_STATUS_STARTED
        - TRADE_STATUS_COMPLETED
        - TRADE_STATUS_CANCELED
      default: TRADE_STATUS_UNSPECIFIED
      title: TradeStatus
    coinbase.simple_trade.models.Disclosure:
      type: object
      properties:
        title:
          type: string
        description:
          type: string
        link:
          allOf:
            - $ref: '#/components/schemas/coinbase.consumer.shared.common.Link'
      title: Disclosure represents a localized disclosure for a fee
    coinbase.simple_trade.models.Error:
      type: object
      properties:
        message:
          type: string
        code:
          type: string
        error_code:
          allOf:
            - $ref: '#/components/schemas/coinbase.simple_trade.models.ErrorCodes'
        error_cta:
          allOf:
            - $ref: '#/components/schemas/coinbase.simple_trade.models.ErrorCta'
        error_metadata:
          allOf:
            - $ref: '#/components/schemas/coinbase.simple_trade.models.ErrorMetadata'
        title:
          type: string
      description: >-
        these are errors which prevent us from creating trades. Ie, BlackListed
        card
      title: |-
        Error is a generic message/code response used for cancellation reasons.
        These include a CTA
    coinbase.simple_trade.models.ErrorCodes:
      type: string
      enum:
        - ERROR_CODES_UNSPECIFIED
        - ERROR_CODES_AUTHENTICATION_ERROR
        - ERROR_CODES_PERMISSION_DENIED
        - ERROR_CODES_NOT_FOUND
        - ERROR_CODES_INTERNAL_SERVER_ERROR
        - ERROR_CODES_SERVICE_UNAVAILABLE
        - ERROR_CODES_INVALID
        - ERROR_CODES_REJECTED
        - ERROR_CODES_LIMIT_ERROR
        - ERROR_CODES_LIMIT_ERROR_INCREASE_ELIGIBLE
        - HIGH_RISK_SCORE_CANCELED
        - ERROR_CODES_DEPOSIT_CHECK_QUESTIONNAIRE_REQUIRED
        - ERROR_CODES_DEPOSIT_CHECK_FACEMATCH_REQUIRED
        - ERROR_CODES_DEPOSIT_CHECK_FACEMATCH_AND_QUESTIONNAIRE_REQUIRED
        - ERROR_CODES_INSUFFICIENT_BALANCE
        - ERROR_CODES_RATE_LIMITED
        - ERROR_CODES_ADDRESS_MISMATCH
        - ERROR_CODES_TRANSACTION_NOT_ALLOWED
        - DEPOSIT_NOT_AUTHORIZED
        - PLAID_INSUFFICIENT_FUNDS
        - ERROR_CODES_LIMIT_ERROR_IDV_MISSING
        - ERROR_CODES_PAYMENT_REJECTED_BY_PROVIDER
        - ERROR_CODES_MISSING_3DS_AUTHENTICATION
        - ERROR_CODES_AUTH_OR_WITHDRAWAL_LIMIT
        - ERROR_CODES_ACCOUNT_TOKEN_EXPIRY
        - ERROR_CODES_UNIMPLEMENTED
        - ERROR_CODES_ZERO_BALANCE
        - ERROR_CODES_IN_LIQUIDATION
        - ERROR_CODES_HIGH_RISK_TRANSFER_REJECTED
        - ERROR_CODES_INSUFFICIENT_FIAT_BUT_SUFFICIENT_SAVINGS
        - ERROR_CODES_TRADE_BLOCKED
        - ERROR_CODES_TRANSFER_UNKNOWN_ERROR
        - ERROR_CODES_TRANSFER_INVALID
        - ERROR_CODES_TRANSFER_REJECTED
        - ERROR_CODES_TRANSFERS_INTERNAL_ERROR
        - ERROR_CODES_TRANSFERS_HEDGER_ERROR
        - ERROR_CODES_BANK_ACCOUNT_VENDOR_CONNECTION_ISSUE
        - ERROR_CODES_CARD_EXPIRED
        - ERROR_CODES_FAILED_PAYMENT
        - ERROR_CODES_PAYMENT_NOT_AUTHORIZED
        - ERROR_CODES_PAYMENT_REJECTED
      default: ERROR_CODES_UNSPECIFIED
      description: ''
      title: ErrorCodes
    coinbase.simple_trade.models.ErrorCta:
      type: string
      enum:
        - ERROR_CTA_UNSPECIFIED
        - ERROR_CTA_BUY_MINIMUM
        - ERROR_CTA_BUY_MAXIMUM
        - ERROR_CTA_BUY_INSUFFICIENT_BALANCE
        - ERROR_CTA_SELL_MINIMUM
        - ERROR_CTA_SELL_ALL
        - ERROR_CTA_SWITCH_PAYMENT
        - ERROR_CTA_SELL_MAXIMUM
        - ERROR_CTA_MAINTENANCE
        - ERROR_CTA_INCREASE_POSITION_LIMIT
        - ERROR_CTA_SWITCH_HIGHER_LIMIT_PAYMENT_METHOD
        - ERROR_CTA_SG_PAYNOW_FAST_BANK_DEPOSIT
        - ERROR_CTA_US_LINK_BANK_ACCOUNT
        - ERROR_CTA_UK_BANK_ACCOUNT_DEPOSIT
        - ERROR_CTA_US_WIRE_TRANSFER_DEPOSIT
        - ERROR_CTA_UNTRADABLE_PRODUCT
        - ERROR_CTA_NO_LIQUIDITY
        - ERROR_CTA_DEPOSIT_INTO_PERPETUAL_PORTFOLIO
        - ERROR_CTA_TRANSFER_INTO_PERPETUAL_FROM_PRIMARY
        - ERROR_CTA_BANK_ACCOUNT_DEPOSIT
        - ERROR_CTA_LINK_BANK_ACCOUNT
      default: ERROR_CTA_UNSPECIFIED
      description: >-
        ErrorCTA indicates the call-to-action that should be shown to users when
        errors occur during trading flows.

        Used to guide users on how to resolve specific error conditions like
        insufficient funds,

        exceeded limits, or invalid payment methods.

         - ERROR_CTA_BANK_ACCOUNT_DEPOSIT: ERROR_CTA_BANK_ACCOUNT_DEPOSIT is used to promote deposit with bank account for Limit smart redirects feature.
        This is shared for UK, DE, NL, AU. The client needs to get user country
        code to render countries specific bank deposit instructions.
         - ERROR_CTA_LINK_BANK_ACCOUNT: ERROR_CTA_LINK_BANK_ACCOUNT is used for CA smart redirects when the user already has an EFT payment method linked,
        prompting them to use their bank account to increase their purchase
        limit.
    coinbase.simple_trade.models.ErrorMetadata:
      type: object
      properties:
        limit_amount:
          allOf:
            - $ref: '#/components/schemas/coinbase.consumer.shared.common.Amount'
        suggested_pm_uuid:
          type: string
        suggested_pm_obfuscated_name:
          type: string
        suggested_pm_category:
          allOf:
            - $ref: >-
                #/components/schemas/coinbase.simple_trade.models.SuggestedPaymentMethodCategory
      title: >-
        ErrorMetadata represents error metadata. ie: limit amount either from
        insufficient fund or payment method limit
    coinbase.simple_trade.models.Fee:
      type: object
      properties:
        title:
          type: string
        description:
          type: string
        amount:
          allOf:
            - $ref: '#/components/schemas/coinbase.consumer.shared.common.Amount'
        label:
          type: string
        disclosure:
          allOf:
            - $ref: '#/components/schemas/coinbase.simple_trade.models.Disclosure'
        waived_details:
          allOf:
            - $ref: '#/components/schemas/coinbase.simple_trade.models.WaivedDetails'
        metadata:
          allOf:
            - $ref: '#/components/schemas/coinbase.simple_trade.models.FeeMetadata'
      description: Fee represents a single fee type. A single trade may have multiple fees.
    coinbase.simple_trade.models.FeeMetadata:
      type: object
      properties:
        netburn:
          title: Netburn fee metadata (optional)
          allOf:
            - $ref: >-
                #/components/schemas/coinbase.simple_trade.models.NetBurnFeeMetadata
      title: FeeMetadata provides mongo-compatible fee metadata (avoids oneof issues)
    coinbase.simple_trade.models.NetBurnFeeMetadata:
      type: object
      properties:
        threshold:
          allOf:
            - $ref: '#/components/schemas/coinbase.consumer.shared.common.Amount'
        netburn_value:
          allOf:
            - $ref: '#/components/schemas/coinbase.consumer.shared.common.Amount'
      title: NetBurnFeeMetadata contains metadata for net burn fee calculations
    coinbase.simple_trade.models.ScaledAmount:
      type: object
      properties:
        amount:
          allOf:
            - $ref: '#/components/schemas/coinbase.consumer.shared.common.Amount'
        scale:
          type: integer
          format: int32
      title: ScaledAmount provides a scale for reference with the common amount
    coinbase.simple_trade.models.SuggestedPaymentMethodCategory:
      type: string
      enum:
        - UNKNOWN
        - ASSET
        - ON_PLATFORM_FIAT
        - OFF_PLATFORM_FIAT
      default: UNKNOWN
    coinbase.simple_trade.models.UnitPrice:
      type: object
      properties:
        target_to_fiat:
          description: e.g. for a BTC-ETH trade $3K / ETH.
          allOf:
            - $ref: '#/components/schemas/coinbase.simple_trade.models.ScaledAmount'
        target_to_source:
          description: |-
            e.g. for a BTC-ETH trade 25 ETH / BTC.
            Only set for C2C trades.
          allOf:
            - $ref: '#/components/schemas/coinbase.simple_trade.models.ScaledAmount'
        source_to_fiat:
          description: |-
            e.g. for a BTC-ETH trade $6K / BTC
            Only set for C2C trades.
          allOf:
            - $ref: '#/components/schemas/coinbase.simple_trade.models.ScaledAmount'
      title: >-
        UnitPrice represents the price of a currency to fiat and to the source
        of trade. For fiat trades target_to_fiat may be equivalent to
        target_to_source
    coinbase.simple_trade.models.UserWarning:
      type: object
      properties:
        id:
          type: string
        link:
          allOf:
            - $ref: '#/components/schemas/coinbase.consumer.shared.common.Link'
        context:
          allOf:
            - $ref: >-
                #/components/schemas/coinbase.simple_trade.models.UserWarningContext
        code:
          type: string
        message:
          type: string
      title: >-
        UserWarning provides context on the user warning and if it should be
        visible to the user
    coinbase.simple_trade.models.UserWarningContext:
      type: object
      properties:
        details:
          type: array
          items:
            type: string
        title:
          type: string
        link_text:
          type: string
      title: >-
        UserWarningContext provides details into the user warning. Used for
        certain payment warnings
    coinbase.simple_trade.models.WaivedDetails:
      type: object
      properties:
        amount:
          allOf:
            - $ref: '#/components/schemas/coinbase.consumer.shared.common.Amount'
        source:
          allOf:
            - $ref: >-
                #/components/schemas/coinbase.simple_trade.models.WaivedFeeSource
      title: WaivedDetails contains details when the fee is waived
    coinbase.simple_trade.models.WaivedFeeSource:
      type: string
      enum:
        - WAIVED_FEE_SOURCE_UNSPECIFIED
        - WAIVED_FEE_SOURCE_TRADE_INCENTIVE
        - WAIVED_FEE_SOURCE_COINBASE_ONE
        - WAIVED_FEE_SOURCE_FEE_REDUCTION_BADGE
        - WAIVED_FEE_SOURCE_TRADE_PROMOTION
      default: WAIVED_FEE_SOURCE_UNSPECIFIED
    google.protobuf.Any:
      type: object
      properties:
        type_url:
          type: string
          description: >-
            A URL/resource name that uniquely identifies the type of the
            serialized

            protocol buffer message. This string must contain at least

            one "/" character. The last segment of the URL's path must represent

            the fully qualified name of the type (as in

            `path/google.protobuf.Duration`). The name should be in a canonical
            form

            (e.g., leading "." is not accepted).


            In practice, teams usually precompile into the binary all types that
            they

            expect it to use in the context of Any. However, for URLs which use
            the

            scheme `http`, `https`, or no scheme, one can optionally set up a
            type

            server that maps type URLs to message definitions as follows:


            * If no scheme is provided, `https` is assumed.

            * An HTTP GET on the URL must yield a [google.protobuf.Type][]
              value in binary format, or produce an error.
            * Applications are allowed to cache lookup results based on the
              URL, or have them precompiled into a binary to avoid any
              lookup. Therefore, binary compatibility needs to be preserved
              on changes to types. (Use versioned type names to manage
              breaking changes.)

            Note: this functionality is not currently available in the official

            protobuf release, and it is not used for type URLs beginning with

            type.googleapis.com. As of May 2023, there are no widely used type
            server

            implementations and no plans to implement one.


            Schemes other than `http`, `https` (or the empty scheme) might be

            used with implementation specific semantics.
        value:
          type: string
          format: byte
          description: >-
            Must be a valid serialized protocol buffer of the above specified
            type.
      description: >-
        `Any` contains an arbitrary serialized protocol buffer message along
        with a

        URL that describes the type of the serialized message.


        Protobuf library provides support to pack/unpack Any values in the form

        of utility functions or additional generated methods of the Any type.


        Example 1: Pack and unpack a message in C++.

            Foo foo = ...;
            Any any;
            any.PackFrom(foo);
            ...
            if (any.UnpackTo(&foo)) {
              ...
            }

        Example 2: Pack and unpack a message in Java.

            Foo foo = ...;
            Any any = Any.pack(foo);
            ...
            if (any.is(Foo.class)) {
              foo = any.unpack(Foo.class);
            }
            // or ...
            if (any.isSameTypeAs(Foo.getDefaultInstance())) {
              foo = any.unpack(Foo.getDefaultInstance());
            }

         Example 3: Pack and unpack a message in Python.

            foo = Foo(...)
            any = Any()
            any.Pack(foo)
            ...
            if any.Is(Foo.DESCRIPTOR):
              any.Unpack(foo)
              ...

         Example 4: Pack and unpack a message in Go

             foo := &pb.Foo{...}
             any, err := anypb.New(foo)
             if err != nil {
               ...
             }
             ...
             foo := &pb.Foo{}
             if err := any.UnmarshalTo(foo); err != nil {
               ...
             }

        The pack methods provided by protobuf library will by default use

        'type.googleapis.com/full.type.name' as the type URL and the unpack

        methods only use the fully qualified type name after the last '/'

        in the type URL, for example "foo.bar.com/x/y.z" will yield type

        name "y.z".


        JSON

        ====

        The JSON representation of an `Any` value uses the regular

        representation of the deserialized, embedded message, with an

        additional field `@type` which contains the type URL. Example:

            package google.profile;
            message Person {
              string first_name = 1;
              string last_name = 2;
            }

            {
              "@type": "type.googleapis.com/google.profile.Person",
              "firstName": <string>,
              "lastName": <string>
            }

        If the embedded message type is well-known and has a custom JSON

        representation, that representation will be embedded adding a field

        `value` which holds the custom JSON in addition to the `@type`

        field. Example (for message [google.protobuf.Duration][]):

            {
              "@type": "type.googleapis.com/google.protobuf.Duration",
              "value": "1.212s"
            }
    grpc.gateway.runtime.Error:
      type: object
      properties:
        error:
          type: string
        code:
          type: integer
          format: int32
        message:
          type: string
        details:
          type: array
          items:
            $ref: '#/components/schemas/google.protobuf.Any'
  securitySchemes:
    apiKeyAuth:
      type: http
      scheme: bearer
      bearerFormat: JWT
      description: >-
        A JWT signed using your CDP API Key Secret, encoded in base64. Refer to
        the [Creating API
        Keys](/coinbase-app/authentication-authorization/api-key-authentication)
        section of our Coinbase App Authentication docs for information on how
        to generate your Bearer Token.
security:
  - apiKeyAuth: []
