trading

Places a buy-side or sell-side market or limit order. Buys are cash-based; sells require a unit quantity.

post/accounts/{account_id}/orders

Request

  • Base URL
    https://api.engine.usesophic.com
  • Auth
    HTTP bearer

Path parameters

account_idstring required

Headers

Idempotency-Keystring nullable

Request body

accepted_appropriateness_warningboolean

When true, records that the person accepted the appropriateness warning shown for this instrument. False is a no-op.

automatic_rolloverboolean nullable

Whether the resulting position rolls into a similar instrument at maturity; valid only for eligible buy orders.

instrumentstring required

The ID of the instrument to buy or sell.

order_type'market' | 'limit' required
quotestring nullable

ID of a previously issued order quote. FX orders replay the locked rate; security cash buys may reference a prior quote for a deviation check against the quoted amount.

side'buy' | 'sell' required

Response

Created

accepted_appropriateness_warningboolean nullable

Whether the customer accepted the appropriateness warning for this instrument. Null on orders placed before the field existed.

accountstring nullable

ID of the parent account. Present on customer orders; null for system-placed orders.

automatic_rolloverboolean nullable

Customer's automatic rollover preference; set only on eligible buy orders.

average_traded_pricestring nullable

Quantity-weighted average price of the executed trades, rounded to 5 decimal places. Clean price for bonds (excludes accrued interest). null until the first trade executes.

cancelled_atstring date-time nullable

The time the order was cancelled.

cancelled_reasonstring nullable

The reason for cancelling the order, if cancelled.

cash_amountstring nullable

The amount to invest (before fees). Buy orders are cash-based (you specify how much to invest, not how many units to buy).

created_atstring date-time required

The timestamp (in ISO-8601 format) of when the resource was created.

currency'EUR' | 'USD' | 'GBP'
feesstring required

The total fees for this order.

filled_atstring date-time nullable

The time the order was filled.

idstring required

Unique resource identifier.

is_cancellableboolean required

Whether the order can be cancelled now; true only for limit orders in a cancellable phase with no fills.

limit_pricestring nullable

Limit price per unit; null for market orders.

modified_atstring date-time required

The timestamp (in ISO-8601 format) of when the resource was last modified.

net_cash_amountstring nullable

The amount to invest after fees. This is what gets traded.

order_type'market' | 'limit' required
positionstring nullable

ID of the position this order belongs to; null until the order executes.

purpose'user_request' | 'rollover' | 'square_off' | 'backfill' | 'portfolio_allocation' required
quantitystring nullable

Requested unit quantity for sell orders.

quotestring nullable

ID of the quote used to place this order. On FX orders, locks the executing rate; when omitted, the order trades at the live rate.

settled_atstring date-time nullable

The time the order was settled.

side'buy' | 'sell' required
status'held' | 'placed' | 'executing' | 'cancelling' | 'filled' | 'settled' | 'cancelled' required
traded_notionalstring required

The total notional value executed.

traded_quantitystring required

The total quantity executed.

Example response

{
  "average_traded_price": "95.08250",
  "cancelled_at": "2026-07-14T09:34:12Z",
  "cash_amount": "1000.00",
  "fees": "1.50",
  "filled_at": "2026-07-14T09:34:12Z",
  "instrument": {
    "about": "Common stock listed on the Nasdaq Global Select Market.",
    "asset_class": [
      {
        "weight": "0.48640000"
      }
    ],
    "days_to_maturity": 182,
    "decimal_precision": 2,
    "exchange": "XNAS",
    "icon_url": "https://storage.googleapis.com/sophic-assets/instrument-icons/in_x7GqT.png",
    "initial_auction_date": "2024-12-30",
    "initial_issue_date": "2025-01-02",
    "isin": "US5949181045",
    "issuer": "United States Department of the Treasury",
    "issuer_country": "US",
    "issuer_credit_rating": "AA+",
    "latest_auction_date": "2025-01-27",
    "latest_issue_date": "2025-01-30",
    "maturity_date": "2025-07-03",
    "name": "Apple Inc.",
    "symbol": "US5949181045",
    "ticker": "AAPL",
    "trading_configuration": {
      "buy": {
        "min_cash_amount": "20000.00000000",
        "min_initial_cash_amount": "100000.00000000",
        "min_initial_quantity": "100.00000000",
        "min_quantity": "10.00000000",
        "modes": [
          "cash"
        ]
      },
      "sell": {
        "min_cash_amount": "1000.00000000",
        "min_quantity": "10.00000000",
        "modes": [
          "quantity"
        ]
      }
    },
    "trading_increment": "0.00010000"
  },
  "limit_price": "95.1000",
  "net_cash_amount": "998.50",
  "quantity": "10.5",
  "settled_at": "2026-07-16T09:34:12Z",
  "traded_notional": "998.50",
  "traded_quantity": "10.5",
  "trades": [
    {
      "accrued_interest": "871.23",
      "executed_at": "2026-07-14T09:34:12Z",
      "instrument": {
        "about": "Common stock listed on the Nasdaq Global Select Market.",
        "asset_class": [
          {
            "weight": "0.48640000"
          }
        ],
        "days_to_maturity": 182,
        "decimal_precision": 2,
        "exchange": "XNAS",
        "icon_url": "https://storage.googleapis.com/sophic-assets/instrument-icons/in_x7GqT.png",
        "initial_auction_date": "2024-12-30",
        "initial_issue_date": "2025-01-02",
        "isin": "US5949181045",
        "issuer": "United States Department of the Treasury",
        "issuer_country": "US",
        "issuer_credit_rating": "AA+",
        "latest_auction_date": "2025-01-27",
        "latest_issue_date": "2025-01-30",
        "maturity_date": "2025-07-03",
        "name": "Apple Inc.",
        "symbol": "US5949181045",
        "ticker": "AAPL",
        "trading_configuration": {
          "buy": {
            "min_cash_amount": "20000.00000000",
            "min_initial_cash_amount": "100000.00000000",
            "min_initial_quantity": "100.00000000",
            "min_quantity": "10.00000000",
            "modes": [
              "cash"
            ]
          },
          "sell": {
            "min_cash_amount": "1000.00000000",
            "min_quantity": "10.00000000",
            "modes": [
              "quantity"
            ]
          }
        },
        "trading_increment": "0.00010000"
      },
      "notional": "99250.00",
      "price": "99.25",
      "quantity": "1000",
      "settled_at": "2026-07-16T10:15:00Z",
      "settlement_date": "2026-07-16",
      "ytm": "4.25"
    }
  ]
}

Changes

    • breaking

      removed subschema #1 from the request property anyOf list

    • breaking

      removed subschema #1 from the request property anyOf list

    • breaking

      removed subschema #1 from the request property anyOf list

    • breaking

      request property was restricted to a list of enum values

    • breaking

      request property was restricted to a list of enum values

    • breaking

      the request property type changed from no type to string

    • breaking

      the request property type changed from no type to string

    • breaking

      added to the response property oneOf list for the response status

    • breaking

      added to the // response property oneOf list for the response status

    • breaking

      the response's property type changed from no type to string for status

    • breaking

      the response's property type changed from no type to string for status

    • breaking

      the response's property type changed from no type to string for status

    • breaking

      the response's property type changed from no type to string for status

    • breaking

      the // response's property type changed from no type to string for status

    • breaking

      the // response's property type changed from no type to string for status

    • breaking

      the // response's property type changed from no type to string for status

    • warning

      removed from the request property allOf list

    • warning

      removed from the request property allOf list

    • warning

      added the new EUR enum value to the // response property for the response status

    • warning

      added the new GBP enum value to the // response property for the response status

    • warning

      added the new USD enum value to the // response property for the response status

    • warning

      added the new backfill enum value to the response property for the response status

    • warning

      added the new buy enum value to the response property for the response status

    • warning

      added the new buy enum value to the // response property for the response status

    • warning

      added the new cancelled enum value to the response property for the response status

    • warning

      added the new cancelling enum value to the response property for the response status

    • warning

      added the new executed enum value to the // response property for the response status

    • warning

      added the new executing enum value to the response property for the response status

    • warning

      added the new filled enum value to the response property for the response status

    • warning

      added the new held enum value to the response property for the response status

    • warning

      added the new limit enum value to the response property for the response status

    • warning

      added the new market enum value to the response property for the response status

    • warning

      added the new placed enum value to the response property for the response status

    • warning

      added the new portfolio_allocation enum value to the response property for the response status

    • warning

      added the new rollover enum value to the response property for the response status

    • warning

      added the new sell enum value to the response property for the response status

    • warning

      added the new sell enum value to the // response property for the response status

    • warning

      added the new settled enum value to the response property for the response status

    • warning

      added the new settled enum value to the // response property for the response status

    • warning

      added the new square_off enum value to the response property for the response status

    • warning

      added the new user_request enum value to the response property for the response status

    • info

      added subschema #1 subschema #2 to the request property anyOf list

    • info

      added subschema #1 subschema #2 to the request property anyOf list

    • info

      added subschema #1 subschema #2 to the request property anyOf list

    • info

      added the new buy enum value to the request property

    • info

      added the new limit enum value to the request property

    • info

      added the new market enum value to the request property

    • info

      added the new sell enum value to the request property

    • info

      removed from the // response property allOf list for the response status

    • info

      removed from the response property allOf list for the response status

    • info

      removed from the response property allOf list for the response status

    • info

      removed from the // response property allOf list for the response status

    • info

      removed from the response property allOf list for the response status

    • info

      removed from the // response property allOf list for the response status

    • info

      removed from the response property allOf list for the response status

    • info

      removed from the response property anyOf list for the response status

    • info

      removed from the // response property anyOf list for the response status

    • info

      added discriminator to response property for the response status

    • info

      added discriminator to // response property for the response status

    • info

      added the optional property to the response with the status