Skip to main content

EDXM Order Entry (1.0.0)

Download OpenAPI specification:Download

Specifications relating to derivatives products including perpetual futures are provided solely for members of EDXM International. Derivatives, including perpetual futures, and related services provided by EDXM International are not available to US persons or institutions or in any other jurisdiction where prohibited by law.

Authentication

These endpoints require authentication. API Credentials can be generated on the Clearing Member Portal via the API Apps tab with the desired permissions. With the client id and secret obtained from the clearing member portal, access tokens must be generated following OAuth2.0 standards using the client_credentials grant type. A POST request will need to be made to https://auth.{server-url}/oauth/token with the following x-www-form-urlencoded parameters

  • audience: https://{server-url}/api
  • grant_type: client_credentials
  • client_id: {your-client-id}
  • client_secret: {your-client-secret}

You can test that you can receive an access token using your credentials in UAT by making the following request:

```
  curl 'https://auth.uat.edxclearing.com/oauth/token' \
  --header 'Content-Type: application/x-www-form-urlencoded' \
  --data-urlencode 'client_id={your-client-id}' \
  --data-urlencode 'client_secret={your-client-secret}' \
  --data-urlencode 'audience=https://uat.edxclearing.com/api' \
  --data-urlencode 'grant_type=client_credentials'
```

The server-url will be based on the environment:

  • Prod: clearing.edxmarkets.com
  • UAT: uat.edxclearing.com

This will then return a json object with one of the fields being the access_token. Provide this token in the API requests as the Authorization header with the string Bearer prepended to the token string.

API Evolution

Changes to this API in the following forms are considered backwards compatible and must be handled by the client application:

  • Adding new fields to an existing response
  • Adding new optional fields to an existing request

Client applications must not fail to deserialize responses with new properties (for example, using 'strict' JSON parsers).

Order Management

Place New Order

Requires MEMBER_ORDER_ENTRY_RW permissions

Places a new order.

For orders of type IMMEDIATE_OR_CANCEL and FILL_OR_KILL, this endpoint will respond with the final state of the order (filled or cancelled) and list of fills. For other order types that can rest on the book (e.g. GOOD_TILL_CANCEL), this endpoint will respond as soon as the order is accepted. Subsequent updates to the order, such as fills, can be observed using the WebSocket endpoint.

path Parameters
account
required
string
Example: my-account

The account of the orders

header Parameters
Authorization
required
string
Example: Bearer your-token

The bearer token use to auth requests

Request Body schema: application/json
required
clientOrderId
required
string (ClientOrderId) [ 1 .. 40 ] characters

A unique order id that the client must use to identify orders.

symbol
required
string (Symbol)

The currency pair to be traded

side
required
string (Side)
Enum: "BUY" "SELL"

The side of the order

orderQty
string (OrderQty)

The quantity of the order.

orderType
required
string (OrderType)
Enum: "LIMIT" "MARKET" "STOP_LIMIT" "STOP_MARKET" "TAKE_PROFIT_STOP_LOSS"

The type of the order:

  • LIMIT: A limit order requiring a Price and either OrderQty or CashOrderQuantity
  • MARKET: A market order where either, OrderQty or CashOrderQuantity must be specified
  • STOP_LIMIT: A stop order that, when triggered, will turn into a limit order. Requires a stopPrice and a price, and must be GOOD_TILL_CANCEL
  • STOP_MARKET: A stop order that, when triggered, will turn into a market order. Requires a stopPrice, must not specify a price, and must be IMMEDIATE_OR_CANCEL
  • TAKE_PROFIT_STOP_LOSS: A two-legged order that, when either leg is triggered, will turn into a market order. Requires takeProfitTriggerPrice, takeProfitOrderType, takeProfitTriggerPriceType, stopLossTriggerPrice, stopLossOrderType and stopLossTriggerPriceType, must not specify a price, and must be IMMEDIATE_OR_CANCEL
price
string (Price)

The price of the order. Used as the limit price when a STOP_LIMIT order is triggered.

stopPrice
string (StopPrice)

The price at which a stop will be triggered. Required for STOP_LIMIT and STOP_MARKET orders.

takeProfitTriggerPrice
string (TakeProfitTriggerPrice)

The price at which the take-profit leg will be triggered. Required for TAKE_PROFIT_STOP_LOSS orders.

takeProfitOrderType
string (TakeProfitOrderType)
Value: "MARKET"

The type of the order the take-profit leg becomes when triggered. Required for TAKE_PROFIT_STOP_LOSS orders.

takeProfitTriggerPriceType
string (TakeProfitTriggerPriceType)
Value: "MARK_PRICE"

The type of price that triggers the take-profit leg. Required for TAKE_PROFIT_STOP_LOSS orders.

stopLossTriggerPrice
string (StopLossTriggerPrice)

The price at which the stop-loss leg will be triggered. Required for TAKE_PROFIT_STOP_LOSS orders.

stopLossOrderType
string (StopLossOrderType)
Value: "MARKET"

The type of the order the stop-loss leg becomes when triggered. Required for TAKE_PROFIT_STOP_LOSS orders.

stopLossTriggerPriceType
string (StopLossTriggerPriceType)
Value: "MARK_PRICE"

The type of price that triggers the stop-loss leg. Required for TAKE_PROFIT_STOP_LOSS orders.

cashOrderQuantity
string (CashOrderQuantity)

The notional quantity of the order.

executionInstruction
Array of strings (ExecutionInstructions)
Items Value: "PARTICIPATE_DONT_INITIATE"

A list of execution instructions for the order.

extendedExecutionInstruction
string (ExtendedExecutionInstruction)
Enum: "RETAIL_LIQUIDITY_PROVIDER" "DESIGNATED_RETAIL"

Designates this order as RLP or Retail:

  • RETAIL_LIQUIDITY_PROVIDER: Can only be aggressed on by DESIGNATED_RETAIL orders
  • DESIGNATED_RETAIL: Can aggress on RETAIL_LIQUIDITY_PROVIDER order
timeInForce
string (TimeInForce)
Enum: "GOOD_TILL_CANCEL" "GOOD_TILL_DATE" "IMMEDIATE_OR_CANCEL" "FILL_OR_KILL"

Designates when the order will expire. If left out, defaults to GOOD_TILL_CANCEL for LIMIT and STOP_LIMIT orders and IMMEDIATE_OR_CANCEL for MARKET, STOP_MARKET and TAKE_PROFIT_STOP_LOSS orders.

  • GOOD_TILL_CANCEL: Order will remain in effect until user cancels
  • GOOD_TILL_DATE: Order will remain in effect until ExpireTime
  • IMMEDIATE_OR_CANCEL: Immediately cancels back any quantity that can't be filled on placement
  • FILL_OR_KILL: Immediately cancels order if entire order cannot be fully filled
expireTime
string (ExpireTime)

UTC timestamp with maximum precision in millis that is the expiry time of the order. If precision is entered in greater precision than millis, the expire time will be truncated to millis. Conditionally required if timeInForce is GOOD_TILL_DATE.

selfMatchPrevention
string (SelfMatchPrevention)
Enum: "CANCEL_NEWEST" "CANCEL_OLDEST" "CANCEL_BOTH"

The self match strategy applied to the order as an aggressor. Defaults to CANCEL_OLDEST for STOP_LIMIT, STOP_MARKET, and TAKE_PROFIT_STOP_LOSS orders.

Responses

Request samples

Content type
application/json
{
  • "clientOrderId": "ET5FZD2OLD",
  • "symbol": "BTC/USD",
  • "side": "BUY",
  • "orderQty": "1.05",
  • "orderType": "LIMIT",
  • "price": "99005.05",
  • "stopPrice": "99005.05",
  • "takeProfitTriggerPrice": "99005.05",
  • "takeProfitOrderType": "MARKET",
  • "takeProfitTriggerPriceType": "MARK_PRICE",
  • "stopLossTriggerPrice": "99005.05",
  • "stopLossOrderType": "MARKET",
  • "stopLossTriggerPriceType": "MARK_PRICE",
  • "cashOrderQuantity": "99005.05",
  • "executionInstruction": [
    ],
  • "extendedExecutionInstruction": "DESIGNATED_RETAIL",
  • "timeInForce": "GOOD_TILL_DATE",
  • "expireTime": "2026-02-03T22:11:05.123",
  • "selfMatchPrevention": "CANCEL_NEWEST"
}

Response samples

Content type
application/json
{
  • "data": {
    }
}

Get Open Orders Status

Requires MEMBER_ORDER_ENTRY_RW permissions

Retrieves all the open orders for an account that have been placed through REST or Websocket APIs.

path Parameters
account
required
string
Example: my-account

The account of the orders

query Parameters
symbol
string
Example: symbol=BTC/USD

The symbol of the orders to return. If left out, all open orders will be returned

header Parameters
Authorization
required
string
Example: Bearer your-token

The bearer token use to auth requests

Responses

Response samples

Content type
application/json
{
  • "data": [
    ]
}

Cancels all orders

Requires MEMBER_ORDER_ENTRY_RW permissions

Will attempt to cancel all open orders for the account that has been placed through REST or Websocket APIs.

path Parameters
account
required
string
Example: my-account

The account of the orders

query Parameters
symbol
string
Example: symbol=BTC/USD

The symbol of the orders to cancel. If left out, all open orders will be attempted to cancel.

header Parameters
Authorization
required
string
Example: Bearer your-token

The bearer token use to auth requests

Responses

Response samples

Content type
application/json
{
  • "data": [
    ]
}

Replace Order

Requires MEMBER_ORDER_ENTRY_RW permissions

Modifies an existing order. Not supported for STOP_MARKET, STOP_LIMIT or TAKE_PROFIT_STOP_LOSS orders.

path Parameters
account
required
string
Example: my-account

The account of the orders

originalClientOrderId
required
string
Example: ET5FZD2OLD

The clientOrderId for the original order that is being replaced.

header Parameters
Authorization
required
string
Example: Bearer your-token

The bearer token use to auth requests

Request Body schema: application/json
required
clientOrderId
required
string (ClientOrderId) [ 1 .. 40 ] characters

A unique order id that the client must use to identify orders.

orderQty
string (OrderQty)

The quantity of the order.

price
string (Price)

The price of the order. Used as the limit price when a STOP_LIMIT order is triggered.

expireTime
string (ExpireTime)

UTC timestamp with maximum precision in millis that is the expiry time of the order. If precision is entered in greater precision than millis, the expire time will be truncated to millis. Conditionally required if timeInForce is GOOD_TILL_DATE.

selfMatchPrevention
string (SelfMatchPrevention)
Enum: "CANCEL_NEWEST" "CANCEL_OLDEST" "CANCEL_BOTH"

The self match strategy applied to the order as an aggressor. Defaults to CANCEL_OLDEST for STOP_LIMIT, STOP_MARKET, and TAKE_PROFIT_STOP_LOSS orders.

Responses

Request samples

Content type
application/json
{
  • "clientOrderId": "ET5FZD2OLD",
  • "orderQty": "1.05",
  • "price": "99005.05",
  • "expireTime": "2026-02-03T22:11:05.123",
  • "selfMatchPrevention": "CANCEL_NEWEST"
}

Response samples

Content type
application/json
{
  • "data": {
    }
}

Cancel Order

Requires MEMBER_ORDER_ENTRY_RW permissions

Cancels an existing order

path Parameters
account
required
string
Example: my-account

The account of the orders

originalClientOrderId
required
string
Example: ET5FZD2OLD

The clientOrderId of the order to be cancelled.

header Parameters
Authorization
required
string
Example: Bearer your-token

The bearer token use to auth requests

Responses

Response samples

Content type
application/json
{
  • "data": {
    }
}

Order History

Get Order History

Requires MEMBER_ORDER_ENTRY_RW permissions

Retrieves a paginated, time-ranged history of order events for the given account, ordered by transaction time. Use the start (inclusive) and end (exclusive) query parameters to bound the time range, and the cursor-based after/pageSize parameters to page through results.

Order history is only accessible for the last 14 days.

path Parameters
account
required
string
Example: my-account

The account ID.

query Parameters
start
required
integer <int64> >= 0

Start time (inclusive) in milliseconds since epoch

end
required
integer <int64> >= 0

End time (exclusive) in milliseconds since epoch

after
string

The cursor at which to start the page (exclusive).

pageSize
integer <int64> [ 1 .. 100 ]
Default: 100
sort
string (SortOrder)
Default: "asc"
Enum: "asc" "desc"
Example: sort=asc

Sort order of the results

Responses

Response samples

Content type
application/json
{
  • "data": [
    ],
  • "responseMetadata": {
    }
}

Get Trade History

Requires MEMBER_ORDER_ENTRY_RW permissions

Retrieves a paginated, time-ranged history of trades for the given account, ordered by transaction time. Use the start (inclusive) and end (exclusive) query parameters to bound the time range, and the cursor-based after/pageSize parameters to page through results.

Trade history is only accessible for the last 14 days.

path Parameters
account
required
string
Example: my-account

The account ID.

query Parameters
start
required
integer <int64> >= 0

Start time (inclusive) in milliseconds since epoch

end
required
integer <int64> >= 0

End time (exclusive) in milliseconds since epoch

after
string

The cursor at which to start the page (exclusive).

pageSize
integer <int64> [ 1 .. 100 ]
Default: 100
sort
string (SortOrder)
Default: "asc"
Enum: "asc" "desc"
Example: sort=asc

Sort order of the results

Responses

Response samples

Content type
application/json
{
  • "data": [
    ],
  • "responseMetadata": {
    }
}

Advanced Order Management

Place Advanced Order

Requires MEMBER_ORDER_ENTRY_RW permissions

Limited availability. Contact EDXM Market Operations for more information.

Place a new advanced order.

path Parameters
account
required
string
Example: my-account

The account ID.

header Parameters
Authorization
required
string
Example: Bearer your-token

The bearer token use to auth requests

Request Body schema: application/json
required
orderType
required
string
symbol
required
string (Symbol)

The currency pair to be traded

side
required
string (Side)
Enum: "BUY" "SELL"

The side of the order

quantity
required
string <number>
clientOrderId
required
string (ClientOrderId) [ 1 .. 40 ] characters

A unique order id that the client must use to identify orders.

takeProfitTriggerPrice
required
string <number>

The price at which to take profit.

takeProfitTriggerPriceType
required
string (TakeProfitStopLossPriceTriggerType)
Value: "MARK_PRICE"

The type of price that will trigger the TP/SL order.

stopLossTriggerPrice
required
string <number>

The price at which to stop loss.

stopLossTriggerPriceType
required
string (TakeProfitStopLossPriceTriggerType)
Value: "MARK_PRICE"

The type of price that will trigger the TP/SL order.

Responses

Request samples

Content type
application/json
Example
{
  • "orderType": "TAKE_PROFIT_STOP_LOSS",
  • "symbol": "BTC/USD",
  • "side": "BUY",
  • "quantity": "string",
  • "clientOrderId": "ET5FZD2OLD",
  • "takeProfitTriggerPrice": "2344.01",
  • "takeProfitTriggerPriceType": "MARK_PRICE",
  • "stopLossTriggerPrice": "2344.01",
  • "stopLossTriggerPriceType": "MARK_PRICE"
}

Response samples

Content type
application/json
{
  • "data": {
    }
}

Find Advanced Orders

Requires MEMBER_ORDER_ENTRY_RW permissions

Limited availability. Contact EDXM Market Operations for more information.

path Parameters
account
required
string
Example: my-account

The account ID.

query Parameters
clientOrderId
string
header Parameters
Authorization
required
string
Example: Bearer your-token

The bearer token use to auth requests

Responses

Response samples

Content type
application/json
{
  • "responseMetadata": {
    },
  • "data": [
    ]
}

Get Advanced Order

Requires MEMBER_ORDER_ENTRY_RW permissions

Limited availability. Contact EDXM Market Operations for more information.

path Parameters
account
required
string
Example: my-account

The account ID.

orderId
required
string
Example: 93a0f274-9304-47d4-93a2-345a7979b53c

The advanced order ID.

header Parameters
Authorization
required
string
Example: Bearer your-token

The bearer token use to auth requests

Responses

Response samples

Content type
application/json
{
  • "data": {
    }
}

Cancel Advanced Order

Requires MEMBER_ORDER_ENTRY_RW permissions

Limited availability. Contact EDXM Market Operations for more information.

path Parameters
account
required
string
Example: my-account

The account ID.

orderId
required
string
Example: 93a0f274-9304-47d4-93a2-345a7979b53c

The advanced order ID.

header Parameters
Authorization
required
string
Example: Bearer your-token

The bearer token use to auth requests

Responses

Response samples

Content type
application/json
{
  • "data": {
    }
}

Order Status

Get Order Status

Requires MEMBER_ORDER_ENTRY_RW permissions

Limited availability. Contact EDXM Market Operations for more information.

Retrieves the current status of order(s). Order status can be found given either an EDXM-generated orderId or a client-generated clientOrderId. Order status is accessible for up to 14 days.

If retrieving order status by orderId, only one data entry will be returned, given that the order exists and has occurred within the last 14 days; otherwise, no data is returned.

If retrieving order status by clientOrderId, multiple data entries may be returned, given the orders exist and have occurred within the last 14 days; otherwise, no data is returned. More than one entry is returned if the given clientOrderId has been re-used in multiple distinct orders in the last 14 days.

Note that some fields in the response are only conditionally optional, depending on the status of the order. For example, symbol is optional in the case where an order is rejected for UNKNOWN_SYMBOL. However, in most cases (e.g. order statuses NEW, PARTIALLY_FILLED, FILLED, CANCELLED, REPLACED) the optional fields associated with the order will be present. Also note, that orderQuantity and price are optional as cashOrderQuantity market orders do not contain a price or a quantity.

path Parameters
account
required
string
Example: my-account

The account of the orders

query Parameters
clientOrderId
string
orderId
string

Responses

Response samples

Content type
application/json
{
  • "data": [
    ],
  • "responseMetadata": {
    }
}

OTC

Request Quote

Requires MEMBER_ORDER_ENTRY_RW permissions

Request a quote.

Note either quantity or cashOrderQuantity must be specified.

path Parameters
account
required
string
Example: my-account

The account ID.

header Parameters
Authorization
required
string
Example: Bearer your-token

The bearer token use to auth requests

Request Body schema: application/json
required
symbol
required
string (Symbol)

The currency pair to be traded

side
required
string (Side)
Enum: "BUY" "SELL"

The side of the order

quantity
string (OrderQty)

The quantity of the order.

cashOrderQuantity
string (CashOrderQuantity)

The notional quantity of the order.

Responses

Request samples

Content type
application/json
{
  • "symbol": "BTC/USD",
  • "side": "BUY",
  • "quantity": "1.05",
  • "cashOrderQuantity": "99005.05"
}

Response samples

Content type
application/json
{
  • "data": {
    }
}

Accept Quote

Requires MEMBER_ORDER_ENTRY_RW permissions

Accept a quote by its quoteId.

path Parameters
account
required
string
Example: my-account

The account ID.

header Parameters
Authorization
required
string
Example: Bearer your-token

The bearer token use to auth requests

Request Body schema: application/json
required
quoteId
required
string (QuoteId)

The ID of the quote.

Responses

Request samples

Content type
application/json
{
  • "quoteId": "019e1c9b-f041-72a4-846d-274a7d22b660"
}

Response samples

Content type
application/json
{
  • "data": {
    }
}