> ## 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` (asset-pair), `side` (buy/sell), etc.



## OpenAPI

````yaml POST /api/v3/brokerage/orders
openapi: 3.0.0
info:
  title: Coinbase Advanced Trade API
  version: '0.1'
servers:
  - url: https://api.coinbase.com
security:
  - apiKeyAuth: []
paths:
  /api/v3/brokerage/orders:
    post:
      tags:
        - Orders
      summary: Create Order
      description: >-
        Create an order with a specified `product_id` (asset-pair), `side`
        (buy/sell), etc.
      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'
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: 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
    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'
    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.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.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
    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"
            }
    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.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.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.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.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.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.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.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.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.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.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.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:
    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.

````