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

# Create Order

> For limit orders, create an order for buying or selling an asset:

- To buy, set `side = BUY` and set `base_amount` to the crypto amount you want to buy.
- To sell, set `side = SELL` and set `base_amount` to the crypto amount you want to sell.

For market orders, create an order for buying or selling an asset:

- To buy, set `side = BUY` and set `quote_amount` to the dollar amount you want to spend.
- To sell, set `side = SELL` and set `base_amount` to the crypto amount you want to sell.

There are five types of orders:

- Limit Orders: Buy or sell at a specified price or better. Execution not guaranteed. Taker orders will be rejected if price deviates 15% from midpoint.
- Post-Only Limit Orders: have the same properties as Limit Orders, but get rejected if they cross the orderbook.
- Market Orders: Operate as Immediate or Cancel (IOC) orders. Price is variable, executes at best available price at time of order.
- Stop Market Orders: Will convert to a market sell order with the specified quantity when the stop price is hit. The stop price does not guarantee that it will be executed at that price. Market conditions (price) might change between the order being triggered and order being executed. Currently only sell stop loss orders are supported.
- Stop Limit Orders: have a Stop Price which when hit, will convert to a limit sell order that will be executed at a specified price (or better)

Maximum notional order size by type:

Order Type | Market  | Maximum Notional Value (USD)
---------- | ------- | ----------------------------
Market     | all     | 500,000
Limit      | BTCUSD  | 1,500,000
Limit      | ETHUSD  | 1,500,000
Limit      | other   | 1,000,000

```bash OAuth Scope theme={null}
exchange:write_order
```


## OpenAPI

````yaml post /profiles/{profile_id}/orders
openapi: 3.0.0
info:
  title: Paxos API
  version: '2.0'
  description: >
    <p>Welcome to Paxos APIs. At Paxos, our mission is to enable the movement of
    any asset, any time, in a trustworthy way. These APIs serve that mission by
    making it easier than ever for you to directly integrate our product
    capabilities into your application, leveraging the speed, stability, and
    security of the Paxos platform.</p> <p>The documentation that follows gives
    you access to our Crypto Brokerage, Trading, and Exchange products. It
    includes APIs for market data, orders, and the held rate quote flow.</p>
    <p>To test in our sandbox environment, <a
    href="https://account.sandbox.paxos.com" target="_blank">sign up</a> for an
    account. For more information about Paxos and our APIs, visit <a
    href="https://www.paxos.com/" target="_blank">Paxos.com</a>.</p>
  x-logo:
    url: /docs/paxos.svg
    backgroundColor: '#FFFFFF'
    altText: Paxos logo
servers:
  - url: https://api.paxos.com/v2
    description: Production
  - url: https://api.sandbox.paxos.com/v2
    description: Sandbox
security: []
tags:
  - name: Profiles
    description: >
      Profiles hold asset balances, and every Paxos transaction is on a
      particular profile.

      Depending on your integration type, Profiles may be used to reflect both
      corporate balances or individual user balances.

      There are two types of Profiles:

      - `DEFAULT` Profiles are system-generated.

      - `NORMAL` Profiles are created using the [Create
      Profile](#operation/CreateProfile) endpoint and are the only type of
      Profile you can create.
  - name: Quotes
    description: >
      Quotes are "held rates" offered by Paxos to buy or sell assets at a
      specific

      price within a period of time - for example, the option to buy BTC within

      the next 30 seconds for $8,000.


      The typical Quotes workflow is as follows:


      1. Call [List Quotes](#operation/ListQuotes) to get the latest available
         quoted prices for the assets you want to buy or sell.
      1. Present the offered price to one or more end-users, with a timer
         indicating the time to expiration.
      1. If a user accepts the price, call [Create Quote
      Execution](#operation/CreateQuoteExecution) with the amount to buy or
      sell.

      1. Call [Get Quote Execution](#operation/GetQuoteExecution) to monitor
         for completion and know when the funds from the execution are available.

      It's important to show end-users the latest available price. If you cache

      prices to show them to multiple users, you should refresh the cache once

      per second.


      You can call [List Quote Executions](#operation/ListQuoteExecutions) to

      review or construct reports on quote execution activity.
  - name: Quote Executions
    description: |
      Quote Executions buy or sell assets using a Quote obtained from
      the [Quotes](#tag/Quotes) flow.
  - name: Orders
    description: >
      <p>There are three types of orders: market, limit and post-only.</p>

      <p>Market orders guarantee execution at a variable price and quantity.
      Limit orders guarantee price and quantity at the time of execution but do
      not guarantee execution. Post-only is an order type that will only be
      placed on the order book if it is the maker side of a trade.</p>
  - name: Market Data
    description: >
      Market data provides various parameters of the order book and historical
      order data.
  - name: Pricing
    description: |
      Pricing provides historical data related to charting of asset prices.

      Note: Some Pricing API markets may be unavailable for trading.
  - name: Issuer Quotes
    description: >
      Issuer Quotes are "held rates" offered by Paxos to mint or redeem
      Paxos-issued assets at a specific price within a period of time - for
      example, the option to buy PAXG within the next 5 seconds for $3,000.


      The typical Issuer Quotes workflow is as follows:


      1. Call [Create Issuer Quote](#operation/CreateIssuerQuote) to get a quote
      for the asset you want to mint or redeem to a specific profile.

      1. Call [Create Issuer Quote
      Execution](#operation/CreateIssuerQuoteExecution) with the quote ID and
      profile ID.


      You can call [List Issuer Quote
      Executions](#operation/ListIssuerQuoteExecutions) to review or construct
      reports on issuer quote execution activity.
  - name: Identity
    description: >
      An Identity represents a person or institution who is able to take actions
      on the Paxos Platform. Depending on 

      your integration type you might not need to create Identities for your end
      users. 


      Identities must pass a set of verifications and checks before they're able
      to transact on the Platform. Learn more

      about getting started with Identity and managing their onboarding
      lifecycle in the [Identity Developer
      Guide](https://docs.paxos.com/identity).
  - name: Institution Members
    description: >
      Institution Members allow you to associate persons with an institution on
      our Platform.

      Each institution can have multiple members, with each member representing
      the relationship to a person identity.


      When creating an institution identity, you must designate at least one
      institution member.

      This requirement ensures we have complete information about the
      institution's ownership structure

      and key personnel, which is necessary to onboard institutions.
  - name: Accounts
    description: >
      Accounts connect Identities (persons or institutions) to Profiles (asset
      balances).

      Key features include:


      - **Balance Management**: Track and manage profile balances via
      [Subledgering](https://docs.paxos.com/crypto-brokerage/ledger-type#fiat-and-crypto-subledger)

      - **Joint Account Support**: Link multiple Identities to a single Account
      for shared on platform balance


      Accounts are required for all Identity API integrations.
  - name: Account Members
    description: >
      Account Members allow you to associate an Identity with an Account on our
      Platform.

      Each Account can be linked to multiple Identities, which supports Joint
      Accounts (where two Identities have the ability

      to transact against a single Profile)  


      Account members are effectively immutable. In order to update an account
      member,

      clients should remove then re-add the account member with the desired
      state.


      The API requires clients to have write access on the account and all
      identities

      associated with the account.
  - name: Identity Documents
    description: >
      The Identity Documents API allows clients to send documents to Paxos to
      validate identities

      during the KYC process. Files can be updated multiple times by re-sending
      the document type

      for processing.


      We currently accept the following file formats:

      - <code>pdf</code>

      - <code>jpg</code>

      - <code>png</code>


      Steps to upload a document are as follows:

      1. Send a <code>PUT</code> request to
      <code>/identity/identities/{id}/documents</code> to get
        the upload URL.
      1. Send your document to the provided URL via a PUT request. Take the
      following example using curl:
        <code>$ curl --upload-file Proof_of_residence.jpg $URI </code>

      Uploaded document metadata will be available via <code>GET</code> request
      to <code>/identity/identities/{id}/documents</code>
  - name: Fiat Transfers
    description: >
      The Fiat Transfers API allows clients to deposit and withdraw fiat via the
      following Fiat Networks: Wire (Fedwire and SWIFT) and CUBIX. The supported
      asset is USD.


      The full set of Fiat Transfers API endpoints is:

      - For Deposits:
        - [Create Fiat Deposit Instructions](#operation/CreateFiatDepositInstructions)
        - [List Fiat Deposit Instructions](#operation/ListFiatDepositInstructions)
        - [Get Fiat Deposit Instructions](#operation/GetFiatDepositInstructions)
      - For Withdrawals:
        - [Create Fiat Account](#operation/CreateFiatAccount)
        - [List Fiat Accounts](#operation/ListFiatAccounts)
        - [Get Fiat Account](#operation/GetFiatAccount)
        - [Delete Fiat Account](#operation/DeleteFiatAccount)
        - [Update Fiat Account](#operation/UpdateFiatAccount)
        - [Create Fiat Withdrawal](#operation/CreateFiatWithdrawal)
  - name: Stablecoin Conversion
    description: >
      <p>Convert between fiat and stablecoin using <a
      href="#operation/CreateStablecoinConversion">Create Stablecoin
      Conversion</a> and check the status of a <a
      href="#operation/GetStablecoinConversion">single conversion</a> or
      retrieve a <a href="#operation/ListStablecoinConversions">list of
      conversions</a>.</p>
    externalDocs:
      description: Learn more about stablecoin conversions →
      url: https://docs.paxos.com/developer/convert
  - name: Transfers
    description: |
      Each deposit to and withdrawal from a Paxos account is a Transfer.
      A Transfer is associated with a particular Profile, and increases or
      decreases the available balance of a single asset in that Profile.
  - name: Tax Forms
    description: >
      All tax forms are associated to a single account_id.

      An account_id can have multiple tax forms associated with it.

      US 1099-B and 1099-Misc tax forms for the previous fiscal year will be
      available in February of the current calendar year.

      Previous years tax forms are also available by request.
  - name: Crypto Deposits
    description: >
      For [Paxos Global PTE
      Ltd](https://help.paxos.com/hc/en-us/articles/9647005243284) users, update
      or reject a crypto deposit that does not contain the required [travel
      rule](https://help.paxos.com/hc/en-us/articles/25928845778068)
      information.

      Deposits with the `NEEDS_INFO` status require additional sender
      information before they can be processed.

      - For individuals, both first and last name are required.

      - For institutions, the institution name is required.


      If a deposit is rejected, the funds will no longer be available.
    externalDocs:
      description: Learn more about travel rule udpates →
      url: https://help.paxos.com/hc/en-us/articles/25422999706900
  - name: Settlement
    description: >
      Use the Settlements API to facilitate simultaneous exchange of pre-funded
      assets. Automate a variety of use cases that require two-party approval,
      including net settlement of over-the-counter trades, withdrawal requests
      for tri-party collateral, payment requests, and bilateral settlement for
      marketplace end users.


      The simple request-and-approval workflow supports both one-directional and
      bidirectional transactions to allow a user to receive an asset (for
      example, send USDP) or simultaneously send and receive assets (for
      example, send USD and receive BTC and ETH). Only when all parties are in
      agreement and assets are fully funded does the Settlements API allow for
      change of custody. Upon completion, all settled assets are immediately
      available for trading, transferring, withdrawal or other supported
      activities.


      The Source Profile initiates the transaction for the Target Profile to
      approve. The `DIRECTION` of each asset is always relative to the Source
      Profile and only the owner of the Source Profile can cancel a transaction
      if it hasn't been approved by the Target Profile.
    externalDocs:
      description: Learn more about the Settlement APIs →
      url: https://docs.paxos.com/settlements
  - name: Paxos Transfers
    description: >
      Move assets between two Entities belonging to the same Organization or to
      a different Organization on the Paxos platform.


      > Transferring USD between Entities is prohibited in some jurisdictions.
      Contact [Support](https://support.paxos.com/) if you run into any problems
      with this restriction.


      Ensure the destination
      [Profile](https://docs.paxos.com/dashboard/organization#profile) already
      exists before beginning the transfer. This may require contacting someone
      outside your Organization to get the destination Profile ID.
  - name: Monitoring Addresses
    description: >
      A Monitoring Address is a blockchain address that Paxos monitors daily for
      eligible stablecoin activity and determines the amount of rewards your
      organization will earn. We recommend adding any addresses you expect to
      hold, receive, or mint Paxos stablecoins as a monitoring address in order
      to receive rewards for all of your qualifying on-chain activity. 


      > Monitoring addresses must be added by month end (`23:59 UTC+0`) in order
      to earn rewards for that month. Addresses added after month end will start
      earning rewards for the following month.


      *These endpoints are only relevant for Global Dollar Network (GDN)
      partners.*
  - name: Payout Address
    description: >-
      Endpoints working with Payout Address. These endpoints are only relevant
      for Global Dollar Network (GDN) partners.
  - name: Statements
    description: >
      A Statement summarizes all eligible stablecoin rewards for a given
      organization over a fixed time period. It aggregates earned reward types
      (e.g., custody, mint, acceptance) and records whether the statement was
      paid.


      Statements are generated monthly and are immutable. Revised statements
      will be issued as a new statement with a unique ID. Statements can be used
      to reconcile balances or for accounting and accounts receivable purposes.


      *These endpoints are only relevant for Global Dollar Network (GDN)
      partners.*
  - name: Payments
    description: >
      Payments represent actual transfers of rewards to the payout address
      associated with a given statement. Payments are made on-chain to a
      specified payout address. Payments tie 1:1 with a statement amount.


      Use the `ref_id` to link payments to statements. 


      > Some fields (e.g., `account_id`, `profile_id`) are populated for
      consistency but are not relevant to reward-specific flows.


      *These endpoints are only relevant for Global Dollar Network (GDN)
      partners.*
  - name: Reward Addresses
    description: >
      Reward addresses are blockchain addresses registered for reward
      attribution.


      Custody Rewards: For EVM chains, Paxos registers these addresses on-chain
      for reward calculation and accrual in the token contract. For Solana,
      provide the **owner account** (not a token account) — Paxos will derive
      and register the associated token account on-chain for the given asset.
      Providing a token account will result in a derived address with no
      meaning. For other non-EVM chains, Paxos tracks on-chain activity for
      custody reward calculation.


      Non-Custody Rewards: Paxos tracks on-chain activity for these addresses to
      calculate and distribute non-custody rewards to your organization.


      *These endpoints are only relevant for whitelisted Rewards partners.*
  - name: Claims
    description: >
      Claims represent rewards paid out on-chain. Use claim schedules to
      automate daily reward claims.


      *These endpoints are only relevant for whitelisted Rewards partners.*
  - name: Payout Groups
    description: >
      Payout groups encapsulate common rewards characteristics. All monitored
      addresses that reference a payout group accumulate rewards at the same
      rate and claim to the payout destination specified for that group.


      *These endpoints are only relevant for whitelisted Rewards partners.*
  - name: Rewards
    description: >
      Rewards details including current reward rates, next accrual time,
      lifetime earned amounts, and estimated next accrual.


      *These endpoints are only relevant for whitelisted Rewards partners.*
  - name: API Credentials
    description: >
      API credentials allow programmatic access to Paxos APIs. These endpoints
      enable you to manage and view your API credentials.
  - name: Events
    description: >
      The Events API allows you to fetch events that occurred on the Paxos
      platform with the full event payload. This REST API can be used as part of
      your webhook integrations (including rebuilding your event history should
      your webhook consumer exceed its retries), or standalone by polling for
      events related to your identities.
  - name: Event Types
    description: >
      List of event types that can be delivered via webhooks. We may add
      additional event types at any time; your implementation should handle
      unexpected event types gracefully.
  - name: Event Objects
    description: >
      Object schemas that describe the structure of data that accompanies each
      event type.
paths:
  /profiles/{profile_id}/orders:
    post:
      tags:
        - Orders
      summary: Create Order
      description: >-
        For limit orders, create an order for buying or selling an asset:


        - To buy, set `side = BUY` and set `base_amount` to the crypto amount
        you want to buy.

        - To sell, set `side = SELL` and set `base_amount` to the crypto amount
        you want to sell.


        For market orders, create an order for buying or selling an asset:


        - To buy, set `side = BUY` and set `quote_amount` to the dollar amount
        you want to spend.

        - To sell, set `side = SELL` and set `base_amount` to the crypto amount
        you want to sell.


        There are five types of orders:


        - Limit Orders: Buy or sell at a specified price or better. Execution
        not guaranteed. Taker orders will be rejected if price deviates 15% from
        midpoint.

        - Post-Only Limit Orders: have the same properties as Limit Orders, but
        get rejected if they cross the orderbook.

        - Market Orders: Operate as Immediate or Cancel (IOC) orders. Price is
        variable, executes at best available price at time of order.

        - Stop Market Orders: Will convert to a market sell order with the
        specified quantity when the stop price is hit. The stop price does not
        guarantee that it will be executed at that price. Market conditions
        (price) might change between the order being triggered and order being
        executed. Currently only sell stop loss orders are supported.

        - Stop Limit Orders: have a Stop Price which when hit, will convert to a
        limit sell order that will be executed at a specified price (or better)


        Maximum notional order size by type:


        Order Type | Market  | Maximum Notional Value (USD)

        ---------- | ------- | ----------------------------

        Market     | all     | 500,000

        Limit      | BTCUSD  | 1,500,000

        Limit      | ETHUSD  | 1,500,000

        Limit      | other   | 1,000,000
      operationId: CreateOrder
      parameters:
        - name: profile_id
          description: The profileId the order will be associated with.
          in: path
          required: true
          schema:
            type: string
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/ExchangePublicCreateOrderBody'
            examples:
              Limit Buy:
                value:
                  side: BUY
                  market: ETHUSD
                  type: LIMIT
                  price: '190.23'
                  base_amount: '2.35781498'
                  metadata:
                    customer_id: 9b8c9cba-801e-4418-adc0-ede709df6339
              Limit Sell:
                value:
                  side: SELL
                  market: ETHUSD
                  type: LIMIT
                  price: '190.23'
                  base_amount: '2.35781498'
                  metadata:
                    customer_id: 9b8c9cba-801e-4418-adc0-ede709df6339
              Market Buy:
                value:
                  side: BUY
                  market: ETHUSD
                  type: MARKET
                  quote_amount: '300.00'
                  metadata:
                    customer_id: 9b8c9cba-801e-4418-adc0-ede709df6339
              Market Sell:
                value:
                  side: SELL
                  market: ETHUSD
                  type: MARKET
                  base_amount: '3.48127123'
                  metadata:
                    customer_id: 9b8c9cba-801e-4418-adc0-ede709df6339
        required: true
      responses:
        '200':
          description: A successful response.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Order'
              examples:
                response:
                  value:
                    id: f190b163-208f-4d73-8deb-4fb8b24add00
                    profile_id: b7b77d82-e6a7-4ae9-9904-36231aedf985
                    ref_id: my-order-1
                    status: SUBMITTED
                    market: ETHUSD
                    side: BUY
                    type: LIMIT
                    price: '190.23'
                    base_amount: '2.35781498'
                    quote_amount: ''
                    metadata:
                      customer_id: 9b8c9cba-801e-4418-adc0-ede709df6339
                    amount_filled: '0.00000000'
                    volume_weighted_average_price: '0.00000000'
                    time_in_force: GTC
        '400':
          $ref: '#/components/responses/bad_request_trade'
        '403':
          description: Could not create order
          content:
            application/problem+json:
              schema:
                $ref: '#/components/schemas/Problem'
              examples:
                Insufficient Funds:
                  $ref: '#/components/examples/Problem_insufficient_funds'
                Notional Value Too Large:
                  $ref: '#/components/examples/Problem_notional_value_too_large'
                Market Conditions Prevented Execution:
                  $ref: >-
                    #/components/examples/Problem_market_conditions_prevented_execution
        '409':
          description: Order already created
          content:
            application/problem+json:
              schema:
                $ref: '#/components/schemas/Problem'
              examples:
                Already Exists:
                  $ref: '#/components/examples/Problem_already_exists_order'
      security:
        - OAuth2:
            - exchange:write_order
components:
  schemas:
    ExchangePublicCreateOrderBody:
      type: object
      example:
        side: BUY
        market: ETHUSD
        type: LIMIT
        price: '190.23'
        base_amount: '2.35781498'
        metadata:
          customer_id: 9b8c9cba-801e-4418-adc0-ede709df6339
      properties:
        ref_id:
          type: string
          description: >-
            The idempotence ID for order creation. Can be reused if the order
            has been closed for more than 24 hours.
        side:
          $ref: '#/components/schemas/OrderSide'
        market:
          $ref: '#/components/schemas/Market'
        type:
          $ref: '#/components/schemas/OrderType'
        base_amount:
          type: string
          description: >-
            The base currency amount for any limit order or the exact amount to
            sell for a market sell order.
          pattern: ^[0-9]*\.?[0-9]+$
        price:
          type: string
          description: The quote price.
        quote_amount:
          type: string
          description: The quote currency amount of purchase for a market buy order.
          pattern: ^[0-9]*\.?[0-9]+$
        metadata:
          type: object
          additionalProperties:
            type: string
          description: >-
            Metadata to store on the quote and created order.

            Up to 6 key/value pairs may be stored, with each key and value at
            most 100 characters.
        await_fill_millis:
          type: integer
          format: int64
          description: >-
            The amount of time to wait for the order to fill, in milliseconds.

            When `await_fill_millis` is set to a non-zero value, the Create
            Order call does not return immediately on order creation. Instead,
            the call blocks until either:
              1. The order has filled completely
              2. The time `await_fill_millis` has elapsed
            The maximum wait timeout is 10 seconds (10000 milliseconds).
          maximum: 10000
        time_in_force:
          $ref: '#/components/schemas/TimeInForce'
        expiration_date:
          type: string
          format: uint64
          description: >-
            The date the order will expire if not completed when specified time
            in force is GTT.

            Format is a unix timestamp in milliseconds (13-digits) UTC (total
            milliseconds that have elapsed since January 1st, 1970 UTC).
        identity_id:
          type: string
          description: >-
            The end user that requests the trade. This field must be used in
            conjunction with `identity_account_id`, otherwise the order is
            rejected. Depending on your integration type, `identity_id` and
            `identity_account_id` may be required.
        identity_account_id:
          type: string
          description: >-
            The account under which this order is placed. The provided identity
            must be allowed to trade on behalf of this account. This field must
            be used in conjunction with `identity_id`, otherwise the order is
            rejected. Depending on your integration type, `identity_account_id`
            and `identity_id` may be required.
        stop_price:
          type: string
          title: The stop price at which a stop order will trigger
        recipient_profile_id:
          type: string
          description: >-
            The profileId that will receive settled currency (base for buy
            orders, quote for sell orders).
        self_match_prevention_id:
          type: string
          description: >-
            The string field used to prevent matching against an opposite side
            order submitted by the same Crypto Brokerage customer. If this field
            is not submitted, an order that matches against another order
            submitted by the same customer will cancel the original resting
            order. Up to 36 characters are supported.

            This field requires additional permissions only available to certain
            accounts. Reach out to your Paxos Representative for more
            information.
      title: Create Order Request
      required:
        - side
        - market
        - type
    Order:
      type: object
      properties:
        id:
          type: string
          description: The UUID of the order.
        profile_id:
          type: string
          description: The profile ID the order is associated with.
        ref_id:
          type: string
          description: >-
            The idempotence ID for order creation. Can be reused if the order
            has been closed for more than 24 hours.
        status:
          $ref: '#/components/schemas/OrderStatus'
        side:
          $ref: '#/components/schemas/OrderSide'
        market:
          $ref: '#/components/schemas/Market'
        type:
          $ref: '#/components/schemas/OrderType'
        base_amount:
          type: string
          description: The base amount or purchase amount for a market sell order.
        price:
          type: string
          description: The quote price.
        quote_amount:
          type: string
          description: The quote amount of purchase for a market buy order.
        metadata:
          type: object
          additionalProperties:
            type: string
          description: Client-specified metadata.
        created_at:
          type: string
          format: date-time
          description: The time at which the order was created.
        modified_at:
          type: string
          format: date-time
          description: The time at which the order was last modified.
        amount_filled:
          type: string
          description: The amount that was filled.
        volume_weighted_average_price:
          type: string
          description: The volume-weighted average price.
        time_in_force:
          $ref: '#/components/schemas/TimeInForce'
        expiration_date:
          type: string
          format: date-time
          description: >-
            The date the order will expire if not completed when specified time
            in force is GTT.
        identity_id:
          type: string
          description: >-
            The end user that requests the trade. This field must be used in
            conjunction with `identity_account_id`, otherwise the order is
            rejected. Depending on your integration type, `identity_id` and
            `identity_account_id` may be required.
        identity_account_id:
          type: string
          description: >-
            The account under which this order is placed. The provided identity
            must be allowed to trade on behalf of this account. This field must
            be used in conjunction with `identity_id`, otherwise the order is
            rejected. Depending on your integration type, `identity_account_id`
            and `identity_id` may be required.
        stop_price:
          type: string
          title: The stop price for a stop order
        recipient_profile_id:
          type: string
          description: >-
            The profileId that will receive settled currency (base for buy
            orders, quote for sell orders).
        is_triggered:
          type: boolean
          description: Returns `true` when a stop order has been triggered.
    Problem:
      type: object
      properties:
        type:
          type: string
          format: uri
          description: >
            An absolute URI that identifies the problem type.  When
            dereferenced,

            it SHOULD provide human-readable documentation for the problem type

            (e.g., using HTML).
          default: about:blank
          example: https://api.paxos.com/v2/problems/insufficient_funds
        title:
          type: string
          description: >
            A short, summary of the problem type. Written in english and
            readable

            for engineers (usually not suited for non technical stakeholders and

            not localized); example: Service Unavailable
          example: Insufficient Funds
        status:
          type: integer
          format: int32
          description: >
            The HTTP status code generated by the origin server for this
            occurrence

            of the problem.
          minimum: 100
          maximum: 600
          exclusiveMaximum: true
          example: 403
        detail:
          type: string
          description: |
            A human readable explanation specific to this occurrence of the
            problem.
          example: Not enough funds in account.
        meta:
          type: object
          description: |
            Additional structured metadata about the error.
    OrderSide:
      type: string
      enum:
        - BUY
        - SELL
      description: Trade side.
    Market:
      type: string
      enum:
        - ETHEUR
        - ETHSGD
        - ETHUSD
        - BTCEUR
        - BTCSGD
        - BTCUSD
        - PAXGUSD
        - BCHUSD
        - LTCUSD
        - USDPUSD
        - LINKUSD
        - AAVEUSD
        - UNIUSD
        - PEPEUSD
        - TRUMPUSD
        - SHIBUSD
        - ARBUSD
        - BONKUSD
        - ENAUSD
        - MNTUSD
        - ONDOUSD
        - PENGUUSD
        - QNTUSD
        - RENDERUSD
        - SKYUSD
        - WIFUSD
        - WLDUSD
      title: ''
    OrderType:
      type: string
      enum:
        - LIMIT
        - MARKET
        - POST_ONLY_LIMIT
        - STOP_MARKET
        - STOP_LIMIT
      description: Trade type.
    TimeInForce:
      type: string
      enum:
        - GTC
        - FOK
        - IOC
        - GTT
      description: >-
        How long an order will remain active before it expires.

        - Immediate-or-Cancel (IOC): Cancel if not executed immediately, partial
        fills allowed.

        - Good-Til-Canceled (GTC): Order can be canceled at any point until
        executed.

        - Good-Til-Time (GTT): Expires if not executed by a specified time. GTT
        must be greater than 10 seconds after the order is placed, otherwise the
        order will be rejected.

        - Fill-or-Kill (FOK): Fill entire order only or cancel entire order,
        does not allow for partial filling.


        **Time in Force validity for Order Types**


        | Order type      | Immediate or Cancel (IOC) | Good Til Canceled (GTC)
        | Good Til Time (GTT) | Fill or Kill (FOK) |

        | --------------- | ------------------------- | -----------------------
        | ------------------- | ------------------ |

        | Market Order    | Default                   |  -                     
        |  -                  |  -                 |

        | Limit Order     | Valid                     | Default                
        | Valid               | Valid              |

        | Post Only Limit | Valid                     | Default                
        | Valid               | Valid              |

        | Stop Market     |  -                        | Default                
        | Valid               |  -                 |

        | Stop Limit      |  -                        | Default                
        | Valid               |  -                 |
    OrderStatus:
      type: string
      enum:
        - PENDING_SUBMISSION
        - SUBMITTED
        - OPEN
        - FILLED
        - CANCELLED
        - REJECTED
        - EXPIRED
      description: |
        Status of the order. The `EXPIRED` status is only applicable
        for Smart Order Routing customers.
  responses:
    bad_request_trade:
      description: Bad Request
      content:
        application/problem+json:
          schema:
            $ref: '#/components/schemas/Problem'
          examples:
            Invalid Base Amount:
              $ref: '#/components/examples/Problem_bad_request'
  examples:
    Problem_insufficient_funds:
      value:
        type: https://developer.paxos.com/docs/v2/problems/insufficient-funds
        title: Insufficient Funds
        status: 403
        detail: >-
          insufficient USD funds in profile
          b7b77d82-e6a7-4ae9-9904-36231aedf985: 100 needed, 50 available
        meta:
          profile_id: b7b77d82-e6a7-4ae9-9904-36231aedf985
          asset: USD
          available: '50'
          needed: '100'
    Problem_notional_value_too_large:
      value:
        type: https://developer.paxos.com/docs/v2/problems/notional-value-too-large
        title: Notional Value Too Large
        status: 403
        detail: >-
          notional value too large for BTCUSD LIMIT order: order had notional
          value 1501234.56, but maximum allowed notional value is 1500000
        meta:
          market: BTCUSD
          order_type: LIMIT
          order_notional_value: '1501234.56'
          max_notional_value: '1500000'
    Problem_market_conditions_prevented_execution:
      value:
        type: >-
          https://developer.paxos.com/docs/v2/problems/market-conditions-prevented-execution
        title: Market Conditions Prevented Execution
        status: 403
        detail: market conditions have invalidated this order
    Problem_already_exists_order:
      value:
        type: https://developer.paxos.com/docs/v2/problems/already-exists
        title: Already Exists
        status: 409
        detail: order already exists with ref_id 'already_used_ref_id'
        meta:
          existing:
            id: f190b163-208f-4d73-8deb-4fb8b24add00
            profile_id: b7b77d82-e6a7-4ae9-9904-36231aedf985
            ref_id: already_used_ref_id
            status: SUBMITTED
            side: BUY
            market: BTCUSD
            quote_amount: '100.00'
    Problem_bad_request:
      value:
        type: about:blank
        title: Bad Request
        status: 400
        detail: 'base_amount invalid: invalid amount ''-10'': must be positive decimal'
  securitySchemes:
    OAuth2:
      type: oauth2
      description: >
        Paxos APIs use [OAuth 2](https://tools.ietf.org/html/rfc6749) with the
        [client credentials](https://tools.ietf.org/html/rfc6749#section-4.4)
        grant flow.


        **Token URLs:**

        - Production: https://oauth.paxos.com/oauth2/token

        - Sandbox: https://oauth.sandbox.paxos.com/oauth2/token


        Learn more in the [API credentials guide
        →](https://docs.paxos.com/developer/credentials)
      flows:
        clientCredentials:
          tokenUrl: https://oauth.paxos.com/oauth2/token
          scopes:
            conversion:read_conversion_stablecoin: Retrieve stablecoin conversion details
            conversion:write_conversion_stablecoin: Create or cancel a stablecoin conversion
            exchange:historical_prices: Retrieve marketnaverage prices at a certain time increment
            exchange:read_order: Retrieve order or order execution details
            exchange:read_quote: Retrieve quote details for buying or selling an asset
            exchange:read_quote_execution: Retrieve quote execution details
            exchange:write_quote_execution: Create a quote execution for buying or selling an asset
            exchange:write_order: Create or cancel an order for buying or selling an asset
            fee:write_crypto_withdrawal_fee: Create a guaranteed fee for crypto withdrawal
            funding:read_bank_balance: Retrieve Paxos dedicated bank account balance
            funding:read_profile: Retrieve Profile details and deposit funds in Sandbox
            funding:write_profile: Create a Profile
            identity:read_account: Retrieve Account details
            identity:read_identity: Retrieve Identity details or documents
            identity:write_account: Create or update Account and Account Members
            identity:write_identity: Create or update Identity details and set Sandbox Identify Status
            settlement:read_transaction: Retrieve settlement transaction details
            settlement:write_transaction: Create, affirm or cancel a settlement transaction
            tax:read_tax_form: Retrieve tax details
            tax:read_tax_lot: Retrieve tax lot details
            tax:write_tax_lot: Update the given tax-lot ID
            transfer:read_deposit_address: Retrieve deposit address details
            transfer:read_fiat_account: Retrieve Fiat Account details
            transfer:read_fiat_deposit_instructions: Retrieve fiat deposit instruction details
            transfer:read_transfer: Retrieve transfer details
            transfer:read_transfer_limit: Retrieve limits for the given transaction type
            transfer:reject_crypto_deposit: Reject a crypto deposit (travel rule)
            transfer:update_crypto_deposit: Provide required travel-rule details
            transfer:write_crypto_withdrawal: Withdraw asset to a specified destination address
            transfer:write_deposit_address: Create an deposit address on a blockchain network
            transfer:write_fiat_account: Create, update or delete a Fiat Account
            transfer:write_fiat_deposit_instructions: Create, update or delete fiat deposit instructions
            transfer:write_internal_transfer: Transfer assets between two Profiles
            transfer:write_sandbox_fiat_deposit: Initiate a test fiat deposit in the Sandbox environment
            transfer:write_fiat_withdrawal: Withdraw fiat to the given destination
            events:read_event: Retrieve events

````