# Place an order Places a new order. After the creation request for the order is accepted, further processing takes place asynchronously. Endpoint: POST /orders Version: 1.75.0 Security: oauth-client-credentials ## Header parameters: - `upvest-client-id` (string, required) Tenant Client ID Example: "ebabcf4d-61c3-4942-875c-e265a7c2d062" - `authorization` (string, required) Bearer (access) token from the OAuth flow with correct scopes. https://datatracker.ietf.org/doc/html/rfc6750 Example: "Bearer c2VjcmV0Cg==" - `signature` (string, required) https://tools.ietf.org/id/draft-ietf-httpbis-message-signatures-01.html#name-the-signature-http-header - `signature-input` (string, required) https://tools.ietf.org/id/draft-ietf-httpbis-message-signatures-01.html#name-the-signature-input-http-he - `idempotency-key` (string, required) A UUID to be used as an idempotency key. This prevents a duplicate request from being replayed. https://docs.upvest.co/documentation/concepts/api_concepts/idempotency Example: "ccb07f42-4104-44ad-8e1f-c660bb7b269c" - `upvest-api-version` (string) Upvest API version (Note: Do not include quotation marks) Enum: "1" ## Request fields (application/json): - `user_id` (string, required) The ID of the user - `account_id` (string, required) The ID of the account that owns the order - `side` (string, required) Side of the order. * BUY - * SELL - Enum: "BUY", "SELL" - `instrument_id` (string, required) International securities identification number defined by [ISO 6166](https://en.wikipedia.org/wiki/International_Securities_Identification_Number). - `instrument_id_type` (string, required) The type of the ID used in the request. * ISIN - Enum: "ISIN" - `cash_amount` (string) Cash amount for a nominal order, not required if a share quantity is specified. - `currency` (string) Alphabetic three-letter [ISO 4217](https://en.wikipedia.org/wiki/ISO_4217) currency code. * EUR - Euro * GBP - British Pound Enum: "EUR", "GBP" - `order_type` (string) Type of the order. * MARKET - * LIMIT - * STOP - Enum: "MARKET", "LIMIT", "STOP" - `quantity` (string) Quantity of securities for the order. Only required if the cash amount is not specified. - `user_instrument_fit_acknowledgement` (boolean) Only applicable if the user has failed the instrument fit check for the instrument type being ordered. True if the user has acknowledged their willingness to trade. - `limit_price` (string) The limit price for orders of the type 'limit'. - `stop_price` (string) The stop price for orders of the type 'stop'. - `expiry_date` (string) The order expiration date (last day the order can trade) in the YYYY-MM-DD format. [RFC 3339, section 5.6](https://json-schema.org/draft/2020-12/json-schema-validation.html#RFC3339) RFC 3339. The default value is order creation date + 200 years - `client_reference` (string) Immutable reference to the API flow that initiated the order. For client initiated API flows, this is a client provided ID. For internal initiations, it is set to the ID of the related object. - `execution_flow` (string) Execution flow that the order processing goes through. If no value is specified, the default value is assumed - STRAIGHT_THROUGH. * STRAIGHT_THROUGH - * BLOCK - Enum: "STRAIGHT_THROUGH", "BLOCK" - `fee_configuration` (array) fee configuration - `fee_configuration.type` (string, required) Fee type * TRANSACTION_FEE_BUY - * TRANSACTION_FEE_SELL - Enum: "TRANSACTION_FEE_BUY", "TRANSACTION_FEE_SELL" - `fee_configuration.value_type` (string, required) The value type must be “ABSOLUTE”. - `fee_configuration.charge_method` (string, required) Indicates whether the fee will be charged by client or by other methods. * CHARGED_BY_CLIENT - * COLLECTED_BY_UPVEST - Enum: "CHARGED_BY_CLIENT", "COLLECTED_BY_UPVEST" - `fee_configuration.cash_amount` (string, required) ## Response 202 fields (application/json): - `id` (string, required) - `created_at` (string, required) Date and time when the resource was created. [RFC 3339-5](https://datatracker.ietf.org/doc/html/rfc3339#section-5.6), [ISO8601 UTC](https://www.iso.org/iso-8601-date-and-time-format.html) - `updated_at` (string, required) Date and time when the resource was last updated. [RFC 3339-5](https://datatracker.ietf.org/doc/html/rfc3339#section-5.6), [ISO8601 UTC](https://www.iso.org/iso-8601-date-and-time-format.html) - `user_id` (string, required) The ID of the user - `account_id` (string, required) The ID of the account that owns the order - `cash_amount` (string, required) Cash amount for a nominal order, not required if a share quantity is specified. - `currency` (string, required) Alphabetic three-letter [ISO 4217](https://en.wikipedia.org/wiki/ISO_4217) currency code. * EUR - Euro * GBP - British Pound Enum: "EUR", "GBP" - `side` (string, required) Side of the order. * BUY - * SELL - Enum: "BUY", "SELL" - `instrument_id` (string, required) International securities identification number defined by [ISO 6166](https://en.wikipedia.org/wiki/International_Securities_Identification_Number). - `instrument_id_type` (string, required) The type of the ID used in the request. * ISIN - Enum: "ISIN" - `order_type` (string, required) Type of the order. * MARKET - * LIMIT - * STOP - Enum: "MARKET", "LIMIT", "STOP" - `quantity` (string, required) Quantity of securities for the order. Only required if the cash amount is not specified. - `status` (string, required) The execution status of the order. * NEW - * PROCESSING - * FILLED - * CANCELLED - Enum: "NEW", "PROCESSING", "FILLED", "CANCELLED" - `fee` (string, required) - `initiation_flow` (string, required) Initiation flow used during order creation, i.e. what triggered the order. * API - * PORTFOLIO - * CASH_DIVIDEND_REINVESTMENT - * PORTFOLIO_REBALANCING - * SELL_TO_COVER_FEES - * SELL_TO_COVER_TAXES - * ACCOUNT_LIQUIDATION - * UPVEST_OPERATIONS - * SAVINGS_PLAN - Enum: "API", "PORTFOLIO", "CASH_DIVIDEND_REINVESTMENT", "PORTFOLIO_REBALANCING", "SELL_TO_COVER_FEES", "SELL_TO_COVER_TAXES", "ACCOUNT_LIQUIDATION", "UPVEST_OPERATIONS", "SAVINGS_PLAN" - `executions` (array, required) Order executions associated with this order - `executions.cash_amount` (string, required) - `executions.share_quantity` (string, required) - `executions.price` (string, required) - `executions.transaction_time` (string, required) - `executions.taxes` (array, required) - `executions.taxes.type` (string, required) Tax type * TOTAL - Enum: "TOTAL" - `executions.taxes.amount` (string, required) - `executions.order_id` (string, required) - `executions.status` (string, required) Execution status of the Execution. * FILLED - * SETTLED - * CANCELLED - Enum: "FILLED", "SETTLED", "CANCELLED" - `executions.side` (string, required) Side of the execution. * BUY - * SELL - Enum: "BUY", "SELL" - `executions.venue_id` (string, required) The ID of the venue - `executions.settlement_date` (string) Order execution settlement date in the YYYY-MM-DD format. [RFC 3339, section 5.6](https://json-schema.org/draft/2020-12/json-schema-validation.html#RFC3339) RFC 3339 - `client_reference` (string, required) Immutable reference to the API flow that initiated the order. For client initiated API flows, this is a client provided ID. For internal initiations, it is set to the ID of the related object. - `user_instrument_fit_acknowledgement` (boolean) Only applicable if the user has failed the instrument fit check for the instrument type being ordered. True if the user has acknowledged their willingness to trade. - `limit_price` (string) The limit price for orders of the type 'limit'. - `stop_price` (string) The stop price for orders of the type 'stop'. - `expiry_date` (string) The order expiration date (last day the order can trade) in the YYYY-MM-DD format. [RFC 3339, section 5.6](https://json-schema.org/draft/2020-12/json-schema-validation.html#RFC3339) RFC 3339. The default value is order creation date + 200 years - `cancellation_reason` (string) Reason for Order cancellation. The field is present in case the Order has a status of CANCELLED. * CANCELLED_BY_CLIENT - * CANCELLED_BY_UPVEST_OPERATIONS - * CANCELLED_BY_TRADING_PARTNER - * CANCELLED_BY_UPVEST_PLATFORM - Enum: "CANCELLED_BY_CLIENT", "CANCELLED_BY_UPVEST_OPERATIONS", "CANCELLED_BY_TRADING_PARTNER", "CANCELLED_BY_UPVEST_PLATFORM" - `execution_flow` (string) Execution flow that the order processing goes through. If no value is specified, the default value is assumed - STRAIGHT_THROUGH. * STRAIGHT_THROUGH - * BLOCK - Enum: "STRAIGHT_THROUGH", "BLOCK" - `fee_configuration` (array) fee configuration - `fee_configuration.type` (string, required) Fee type * TRANSACTION_FEE_BUY - * TRANSACTION_FEE_SELL - Enum: "TRANSACTION_FEE_BUY", "TRANSACTION_FEE_SELL" - `fee_configuration.value_type` (string, required) The value type must be “ABSOLUTE”. - `fee_configuration.charge_method` (string, required) Indicates whether the fee will be charged by client or by other methods. * CHARGED_BY_CLIENT - * COLLECTED_BY_UPVEST - Enum: "CHARGED_BY_CLIENT", "COLLECTED_BY_UPVEST" ## Response 400 fields (application/problem+json): - `type` (string, required) URL to a document describing the error condition. - `status` (integer, required) Transmission of the HTTP status code so that all information can be found in one place, but also to correct changes in the status code due to the use of proxy servers. - `title` (string) A short, human-readable title for the general error type; the title should not change for given types. - `detail` (string) A human-readable description of the specific error. - `instance` (string) This optional key may be present, with a unique URI for the specific error; this will often point to an error log for that specific response. - `request_id` (string) Correlation ID for the original request. ## Response 401 fields (application/problem+json): - `type` (string, required) URL to a document describing the error condition. - `status` (integer, required) Transmission of the HTTP status code so that all information can be found in one place, but also to correct changes in the status code due to the use of proxy servers. - `title` (string) A short, human-readable title for the general error type; the title should not change for given types. - `detail` (string) A human-readable description of the specific error. - `instance` (string) This optional key may be present, with a unique URI for the specific error; this will often point to an error log for that specific response. - `request_id` (string) Correlation ID for the original request. ## Response 403 fields (application/problem+json): - `type` (string, required) URL to a document describing the error condition. - `status` (integer, required) Transmission of the HTTP status code so that all information can be found in one place, but also to correct changes in the status code due to the use of proxy servers. - `title` (string) A short, human-readable title for the general error type; the title should not change for given types. - `detail` (string) A human-readable description of the specific error. - `instance` (string) This optional key may be present, with a unique URI for the specific error; this will often point to an error log for that specific response. - `request_id` (string) Correlation ID for the original request. ## Response 406 fields (application/problem+json): - `type` (string, required) URL to a document describing the error condition. - `status` (integer, required) Transmission of the HTTP status code so that all information can be found in one place, but also to correct changes in the status code due to the use of proxy servers. - `title` (string) A short, human-readable title for the general error type; the title should not change for given types. - `detail` (string) A human-readable description of the specific error. - `instance` (string) This optional key may be present, with a unique URI for the specific error; this will often point to an error log for that specific response. - `request_id` (string) Correlation ID for the original request. ## Response 422 fields (application/problem+json): - `type` (string, required) URL to a document describing the error condition. - `status` (integer, required) Transmission of the HTTP status code so that all information can be found in one place, but also to correct changes in the status code due to the use of proxy servers. - `title` (string) A short, human-readable title for the general error type; the title should not change for given types. - `detail` (string) A human-readable description of the specific error. - `instance` (string) This optional key may be present, with a unique URI for the specific error; this will often point to an error log for that specific response. - `request_id` (string) Correlation ID for the original request. ## Response 429 fields (application/problem+json): - `type` (string, required) URL to a document describing the error condition. - `status` (integer, required) Transmission of the HTTP status code so that all information can be found in one place, but also to correct changes in the status code due to the use of proxy servers. - `title` (string) A short, human-readable title for the general error type; the title should not change for given types. - `detail` (string) A human-readable description of the specific error. - `instance` (string) This optional key may be present, with a unique URI for the specific error; this will often point to an error log for that specific response. - `request_id` (string) Correlation ID for the original request. ## Response 500 fields (application/problem+json): - `type` (string, required) URL to a document describing the error condition. - `status` (integer, required) Transmission of the HTTP status code so that all information can be found in one place, but also to correct changes in the status code due to the use of proxy servers. - `title` (string) A short, human-readable title for the general error type; the title should not change for given types. - `detail` (string) A human-readable description of the specific error. - `instance` (string) This optional key may be present, with a unique URI for the specific error; this will often point to an error log for that specific response. - `request_id` (string) Correlation ID for the original request. ## Response 503 fields (application/problem+json): - `type` (string, required) URL to a document describing the error condition. - `status` (integer, required) Transmission of the HTTP status code so that all information can be found in one place, but also to correct changes in the status code due to the use of proxy servers. - `title` (string) A short, human-readable title for the general error type; the title should not change for given types. - `detail` (string) A human-readable description of the specific error. - `instance` (string) This optional key may be present, with a unique URI for the specific error; this will often point to an error log for that specific response. - `request_id` (string) Correlation ID for the original request. ## Response 504 fields (application/problem+json): - `type` (string, required) URL to a document describing the error condition. - `status` (integer, required) Transmission of the HTTP status code so that all information can be found in one place, but also to correct changes in the status code due to the use of proxy servers. - `title` (string) A short, human-readable title for the general error type; the title should not change for given types. - `detail` (string) A human-readable description of the specific error. - `instance` (string) This optional key may be present, with a unique URI for the specific error; this will often point to an error log for that specific response. - `request_id` (string) Correlation ID for the original request.