Orders

Create order

Submits a new order to Paradex.

Returns an order status object with a unique order id assigned by Paradex. This order id serves as the primary identifier for the order.

The REST API performs basic validation and queues the order for risk checks (order status=NEW).

Once validation and risk checks are successful, the order is sent to the matching engine. The matching engine processes the order and updates the status to OPEN if the order is resting. If the order is fully filled or cannot be processed, the status changes to CLOSED and a cancel_reason code is provided (e.g., fully filled or no liquidity).

post/orders

Request body

client_idstring

Unique client assigned ID for the order

dime_discountboolean

If true, fees are charged in DIME with the DIME discount applied; falls back to USDC if balance is insufficient

flagsResponsesOrderFlag[]

Order flags, allow flag: REDUCE_ONLY

instruction'GTC' | 'POST_ONLY' | 'IOC' | 'RPI' required
marketstring required

Market for which order is created

on_behalf_of_accountstring

ID corresponding to the configured isolated margin account. Only for isolated margin orders

pricestring required

Order price

recv_windowinteger

Order will be created if it is received by API within RecvWindow milliseconds from signature timestamp, minimum is 10 milliseconds

side'BUY' | 'SELL' required
signaturestring required

Order signature in as a string "[r,s]" signed by account's paradex private key

signature_timestampinteger required

Unix timestamp in milliseconds of order creation, used for signature verification

sizestring required

Size of the order

stpstring

Self Trade Prevention, EXPIRE_MAKER, EXPIRE_TAKER or EXPIRE_BOTH, if empty EXPIRE_TAKER

trigger_pricestring

Trigger price for stop order

type'MARKET' | 'LIMIT' | 'STOP_LIMIT' | 'STOP_MARKET' | 'TAKE_PROFIT_LIMIT' | 'TAKE_PROFIT_MARKET' | 'STOP_LOSS_MARKET' | 'STOP_LOSS_LIMIT' required
vwap_pricestring

Optional VWAP price for market orders used for VWAP instruction, bounded by price band

Example request

{
  "client_id": "123454321",
  "market": "BTC-USD-PERP",
  "on_behalf_of_account": "0x1234567890abcdef",
  "price": "29500.12",
  "size": "1.213"
}

Response

Created

accountstring

Paradex Account

avg_fill_pricestring

Average fill price of the order

cancel_reasonstring

Reason for order cancellation if it was closed by cancel

client_idstring

Client order id provided by the client at order creation

created_atinteger

Order creation time

flagsResponsesOrderFlag[]

Order flags, allow flag: REDUCE_ONLY

idstring

Unique order identifier generated by Paradex

instruction'GTC' | 'POST_ONLY' | 'IOC' | 'RPI'
last_updated_atinteger

Order last update time. No changes once status=CLOSED

marketstring

Market

pricestring

Order price. 0 for MARKET orders

published_atinteger

Timestamp in milliseconds when order was sent to the client

received_atinteger

Timestamp in milliseconds when order was received by API service

remaining_sizestring

Remaining size of the order

seq_nointeger

Unique increasing number (non-sequential) that is assigned to this order update and changes on every order update. Can be used to deduplicate multiple feeds. WebSocket and REST responses use independently generated seq_no per event.

side'BUY' | 'SELL'
sizestring

Order size

status'NEW' | 'UNTRIGGERED' | 'OPEN' | 'CLOSED'
stp'EXPIRE_MAKER' | 'EXPIRE_TAKER' | 'EXPIRE_BOTH'
timestampinteger

Order signature timestamp

trigger_pricestring

Trigger price for stop order

type'MARKET' | 'LIMIT' | 'STOP_LIMIT' | 'STOP_MARKET' | 'TAKE_PROFIT_LIMIT' | 'TAKE_PROFIT_MARKET' | 'STOP_LOSS_MARKET' | 'STOP_LOSS_LIMIT'

Example response

{
  "account": "0x4638e3041366aa71720be63e32e53e1223316c7f0d56f7aa617542ed1e7512x",
  "avg_fill_price": "26000",
  "cancel_reason": "NOT_ENOUGH_MARGIN",
  "client_id": "x1234",
  "created_at": 1681493746016,
  "id": "123456",
  "last_updated_at": 1681493746016,
  "market": "BTC-USD-PERP",
  "price": "26000",
  "published_at": 1681493746016,
  "received_at": 1681493746016,
  "remaining_size": "0",
  "seq_no": 1681471234972000000,
  "size": "0.05",
  "timestamp": 1681493746016,
  "trigger_price": "26000"
}

Changes

Changed in 8 of the 65 revisions of this API.113210

    • added the new BLOCK_TRADE_REPLAYED_SIGNATURE enum value to the //// response property for the response status

      response-property-enum-value-added

    • added the new EVM_VAULT_OPERATORS_DISABLED enum value to the //// response property for the response status

      response-property-enum-value-added

    • added the new VAULT_DATA_PRIVATE enum value to the //// response property for the response status

      response-property-enum-value-added

    • removed the INVALID_RHINOFI_QUOTE enum value from the //// response property for the response status

      response-property-enum-value-removed

    • removed the INVALID_RHINOFI_QUOTE_COMMIT enum value from the //// response property for the response status

      response-property-enum-value-removed

    • removed the INVALID_RHINOFI_REQUEST enum value from the //// response property for the response status

      response-property-enum-value-removed

    • added the new IP_NOT_ALLOWED enum value to the //// response property for the response status

      response-property-enum-value-added

    • added the new MARKET_NOT_SETTLED enum value to the //// response property for the response status

      response-property-enum-value-added

    • added the new BLOCK_TRADE_INVALID_SIGNATURE enum value to the //// response property for the response status

      response-property-enum-value-added

    • added the new BLOCK_TRADE_SIGNER_KEY_UNAUTHORIZED enum value to the //// response property for the response status

      response-property-enum-value-added

    • added the new EVM_ADDRESS_ALREADY_ONBOARDED enum value to the //// response property for the response status

      response-property-enum-value-added

    • added the new INSUFFICIENT_EVM_BALANCE enum value to the //// response property for the response status

      response-property-enum-value-added

    • added the new PORTFOLIO_MARGIN_INVALID_ACCOUNT_KIND enum value to the //// response property for the response status

      response-property-enum-value-added

    • added the new PORTFOLIO_MARGIN_ONBOARDING_DISABLED enum value to the //// response property for the response status

      response-property-enum-value-added

    • removed the BAD_STARKNET_REQUEST enum value from the //// response property for the response status

      response-property-enum-value-removed

    • removed the INVALID_PRICE_PRECISION enum value from the //// response property for the response status

      response-property-enum-value-removed

    • removed the TRANSACTION_NOT_FOUND enum value from the //// response property for the response status

      response-property-enum-value-removed

  • 46a57608a79010212See the full diff
    • the request property type changed from object to no type

      request-property-type-changed

    • the request property type changed from object to no type

      request-property-type-changed

    • the request property type changed from object to no type

      request-property-type-changed

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

      response-property-type-changed

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

      response-property-type-changed

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

      response-property-type-changed

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

      response-property-type-changed

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

      response-property-type-changed

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

      response-property-type-changed

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

      response-property-type-changed

    • added the new BLOCK_TRADE_ACCOUNT_MISMATCH enum value to the //// response property for the response status

      response-property-enum-value-added

    • added the new BLOCK_TRADE_ALREADY_CANCELLED enum value to the //// response property for the response status

      response-property-enum-value-added

    • added the new BLOCK_TRADE_EXPIRED enum value to the //// response property for the response status

      response-property-enum-value-added

    • added the new BLOCK_TRADE_INVALID_STATUS enum value to the //// response property for the response status

      response-property-enum-value-added

    • added the new BLOCK_TRADE_MISSING_SIGNATURE enum value to the //// response property for the response status

      response-property-enum-value-added

    • added the new BLOCK_TRADE_MISSING_SIGNERS enum value to the //// response property for the response status

      response-property-enum-value-added

    • added the new BLOCK_TRADE_MISSING_TRADES enum value to the //// response property for the response status

      response-property-enum-value-added

    • added the new BLOCK_TRADE_NOT_ENABLED enum value to the //// response property for the response status

      response-property-enum-value-added

    • added the new BLOCK_TRADE_NOT_FOUND enum value to the //// response property for the response status

      response-property-enum-value-added

    • added the new BLOCK_TRADE_UNAUTHORIZED enum value to the //// response property for the response status

      response-property-enum-value-added

    • added the new EVM_SIGNATURE_VERIFICATION_FAILED enum value to the //// response property for the response status

      response-property-enum-value-added

    • added the new INVALID_EVM_SIGNATURE enum value to the //// response property for the response status

      response-property-enum-value-added

    • added the new MEDIA_NOT_FOUND enum value to the //// response property for the response status

      response-property-enum-value-added

    • added the new OFFER_ALREADY_CANCELLED enum value to the //// response property for the response status

      response-property-enum-value-added

    • added the new OFFER_INVALID_STATUS enum value to the //// response property for the response status

      response-property-enum-value-added

    • added the new OFFER_PARENT_MISMATCH enum value to the //// response property for the response status

      response-property-enum-value-added

    • added the new OFFER_PARENT_NOT_ACCEPTING enum value to the //// response property for the response status

      response-property-enum-value-added

    • added the new OFFER_UNAUTHORIZED enum value to the //// response property for the response status

      response-property-enum-value-added

    • added the new PORTFOLIO_MARGIN_CONFIG_NOT_FOUND enum value to the //// response property for the response status

      response-property-enum-value-added

    • added the new SUBKEY_NOT_ACTIVATABLE enum value to the //// response property for the response status

      response-property-enum-value-added

    • added the new XP_TRANSFERS_DISABLED enum value to the //// response property for the response status

      response-property-enum-value-added

    • added the new optional request property

      new-optional-request-property

    • removed the INVALID_JOIN_WAITLIST_REQUEST enum value from the //// response property for the response status

      response-property-enum-value-removed

  • 846a2e2b455b12See the full diff
    • added required request body

      request-body-added-required

    • added the media type application/json for the response with the status

      response-media-type-added

    • added the media type application/json for the response with the status

      response-media-type-added

    This revision also has 1 change that name no endpoint, such as unreferenced schemas being removed. See the revision's changelog