> ## Documentation Index
> Fetch the complete documentation index at: https://docs.cdp.coinbase.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Create Order

> Create an order with a specified `product_id`, `side`, and `order_configuration`.

**Equities:** Use the canonical `product_id` returned by the Products API, not the display ticker. Include `equity_order_metadata` to select the trading session and time in force. Use `market_market_ioc` with `MARKET_GFD` for market orders, which are supported only during the normal session. Use `limit_limit_gtc` with `LIMIT_GFD` or `LIMIT_GTC` for limit orders. In pre-market, after-hours, overnight, or multi-session trading, specify a positive whole-share `base_size`; `quote_size` and fractional sizing are not supported. Attached orders are not supported for equities.



## OpenAPI

````yaml POST /api/v3/brokerage/orders
openapi: 3.1.0
info:
  title: Coinbase Advanced Trade API
  version: '0.1'
servers:
  - url: https://api.coinbase.com
security:
  - ApiKey: []
  - OAuth2: []
paths:
  /api/v3/brokerage/orders:
    post:
      tags:
        - Orders
      summary: Create Order
      description: >-
        Create an order with a specified `product_id`, `side`, and
        `order_configuration`.


        **Equities:** Use the canonical `product_id` returned by the Products
        API, not the display ticker. Include `equity_order_metadata` to select
        the trading session and time in force. Use `market_market_ioc` with
        `MARKET_GFD` for market orders, which are supported only during the
        normal session. Use `limit_limit_gtc` with `LIMIT_GFD` or `LIMIT_GTC`
        for limit orders. In pre-market, after-hours, overnight, or
        multi-session trading, specify a positive whole-share `base_size`;
        `quote_size` and fractional sizing are not supported. Attached orders
        are not supported for equities.
      operationId: RetailBrokerageApi_PostOrder
      requestBody:
        content:
          application/json:
            schema:
              $ref: >-
                #/components/schemas/coinbase.public_api.authed.retail_brokerage_api.NewOrderRequest
        required: true
      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'
      security:
        - ApiKey:
            - trade
        - OAuth2:
            - wallet:buys:create
components:
  schemas:
    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: >-
            Canonical product identifier for the order. For equities, use the
            product_id returned by the Products API, not the display ticker.
          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
        equity_order_metadata:
          description: >-
            Equity-specific order instructions. For equity products, use this
            field to select the trading session and time in force.
          allOf:
            - $ref: >-
                #/components/schemas/coinbase.public_api.authed.retail_brokerage_api.EquityOrderMetadata
        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
    grpc.gateway.runtime.Error:
      type: object
      properties:
        error:
          type: string
        code:
          type: integer
          format: int32
        message:
          type: string
        details:
          type: array
          items:
            type: object
            additionalProperties: true
    coinbase.public_api.authed.retail_brokerage_api.OrderSide:
      type: string
      enum:
        - BUY
        - SELL
      default: ''
    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.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.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.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.EquityOrderMetadata:
      type: object
      properties:
        equity_trading_session:
          description: >-
            Trading session in which the equity order may execute. Defaults to
            EQUITY_TRADING_SESSION_NORMAL when omitted. Market orders are
            supported only in the normal session. Any non-normal session
            requires a limit order with a positive whole-share base_size;
            quote_size and fractional sizing are not supported.
          allOf:
            - $ref: >-
                #/components/schemas/coinbase.public_api.authed.retail_brokerage_api.EquityTradingSession
        displayed_order_config:
          description: >-
            Time-in-force instruction for the equity order. Use MARKET_GFD with
            market_market_ioc, or LIMIT_GFD/LIMIT_GTC with limit_limit_gtc. If
            omitted from a public market order, the API normalizes it to
            MARKET_GFD.
          allOf:
            - $ref: >-
                #/components/schemas/coinbase.public_api.authed.retail_brokerage_api.DisplayedOrderConfig
      description: Equity-specific order instructions and response metadata.
    coinbase.positions.CostBasisMethod:
      type: string
      enum:
        - COST_BASIS_METHOD_UNSPECIFIED
        - COST_BASIS_METHOD_HIFO
        - COST_BASIS_METHOD_LIFO
        - COST_BASIS_METHOD_FIFO
        - COST_BASIS_METHOD_SPEC_ID
      default: COST_BASIS_METHOD_UNSPECIFIED
      description: CostBasisMethod specifies the cost basis method for tax lot matching.
    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.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.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.
        currency_size:
          description: >-
            quote_size converted to the user's native currency. Empty when the
            order is not sized in quote or when rates are unavailable.
          allOf:
            - $ref: >-
                #/components/schemas/coinbase.public_api.authed.retail_brokerage_api.Amount
      title: Order entry configurations
    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.
    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.
    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.
        currency_size:
          description: >-
            quote_size converted to the user's native currency. Empty when the
            order is not sized in quote or when rates are unavailable.
          allOf:
            - $ref: >-
                #/components/schemas/coinbase.public_api.authed.retail_brokerage_api.Amount
    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:59Z'
          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.
        currency_size:
          description: >-
            quote_size converted to the user's native currency. Empty when the
            order is not sized in quote or when rates are unavailable.
          allOf:
            - $ref: >-
                #/components/schemas/coinbase.public_api.authed.retail_brokerage_api.Amount
    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.
    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:59Z'
          description: Time at which the order should begin executing.
        end_time:
          type: string
          format: RFC3339 Timestamp
          example: '2021-05-31T09:59:59Z'
          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.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:59Z'
          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.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:59Z'
          description: The time at which the order will be cancelled if it is not Filled.
    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.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.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
      description: >-
        Equity execution session. NORMAL is regular market hours and is the only
        session that supports market orders. PRE_MARKET, AFTER_HOURS, OVERNIGHT,
        and MULTI_SESSION accept only whole-share limit orders. MULTI_SESSION
        spans multiple eligible sessions.
      title: Trading session in which an equity order may execute.
    coinbase.public_api.authed.retail_brokerage_api.DisplayedOrderConfig:
      type: string
      enum:
        - UNKNOWN_DISPLAYED_ORDER_CONFIG
        - INSTANT_GFD
        - LIMIT_GFD
        - LIMIT_GTC
        - MARKET_GFD
        - EXERCISE_GFD
      default: UNKNOWN_DISPLAYED_ORDER_CONFIG
      description: >-
        Equity time-in-force values: MARKET_GFD is Good For Day for Advanced
        Trade market orders; LIMIT_GFD is Good For Day for limit orders;
        LIMIT_GTC is Good Till Cancelled for limit orders. INSTANT_GFD is a
        legacy Simple Trade value and EXERCISE_GFD applies only to equity option
        exercise orders.
      title: >-
        Displayed order configuration. Equity values encode time-in-force
        instructions.
    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
        - RFQ_QUOTE_EXPIRED
        - RFQ_TOO_MANY_OPEN_QUOTES
        - RFQ_RATE_LIMITED
        - RFQ_INVALID_COMBO_LEGS
        - RFQ_VALIDATION_FAILURE
        - RFQ_VENUE_REJECTED
      default: UNKNOWN_FAILURE_REASON
    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
        - PREVIEW_INVALID_UNSUPPORTED_INSTRUMENT
      default: UNKNOWN_PREVIEW_FAILURE_REASON
    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.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.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
  securitySchemes:
    ApiKey:
      type: http
      scheme: bearer
      bearerFormat: JWT
      description: >-
        A bearer token signed using your API Key Secret, see [Creating API
        Keys](/coinbase-app/authentication-authorization/api-key-authentication)
        section of our docs for more information. See [Scope &
        Permissions](/coinbase-app/advanced-trade-apis/rest-scopes) for the
        permission each endpoint requires.
    OAuth2:
      type: oauth2
      description: >-
        An OAuth 2.0 access token from the Coinbase App OAuth2 flow. See [Scope
        & Permissions](/coinbase-app/advanced-trade-apis/rest-scopes) for the
        scope each endpoint requires.
      flows:
        authorizationCode:
          authorizationUrl: https://login.coinbase.com/oauth2/auth
          tokenUrl: https://login.coinbase.com/oauth2/token
          scopes:
            wallet:user:read: View your account information.
            wallet:user:update: Update your account information.
            wallet:accounts:read: View your accounts.
            wallet:buys:create: Place, edit, and cancel orders.
            wallet:trades:read: View your cryptocurrency conversions.
            wallet:trades:create: Convert cryptocurrencies.
            wallet:transactions:read: View your transactions.
            wallet:transactions:transfer: Transfer funds between accounts.
            wallet:payment-methods:read: View your payment methods.

````